aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2019-12-20 08:04:24 +0100
committerPeter Eisentraut <peter@eisentraut.org>2019-12-20 08:16:44 +0100
commit8c6d30f211390df911072d33f0114a31f066a4cd (patch)
tree50e4c27d5bfa75a466e65e20e580439a883c149d /src
parent6136e94dcb88c50b6156aa646746565400e373d4 (diff)
downloadpostgresql-8c6d30f211390df911072d33f0114a31f066a4cd.tar.gz
postgresql-8c6d30f211390df911072d33f0114a31f066a4cd.zip
Fix compiler warnings on MSYS2
The PS_USE_NONE case in ps_status.c left a couple of unused variables exposed. Discussion: https://www.postgresql.org/message-id/flat/6b467edc-4018-521f-ab18-171f098557ca%402ndquadrant.com
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/misc/ps_status.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/utils/misc/ps_status.c b/src/backend/utils/misc/ps_status.c
index 6c851dd4982..b1b184229a0 100644
--- a/src/backend/utils/misc/ps_status.c
+++ b/src/backend/utils/misc/ps_status.c
@@ -89,6 +89,8 @@ bool update_process_title = true;
#endif
+#ifndef PS_USE_NONE
+
#ifndef PS_USE_CLOBBER_ARGV
/* all but one option need a buffer to write their ps line in */
#define PS_BUFFER_SIZE 256
@@ -104,6 +106,8 @@ static size_t ps_buffer_cur_len; /* nominal strlen(ps_buffer) */
static size_t ps_buffer_fixed_size; /* size of the constant prefix */
+#endif /* not PS_USE_NONE */
+
/* save the original argv[] location here */
static int save_argc;
static char **save_argv;
@@ -420,7 +424,11 @@ get_ps_display(int *displen)
}
#endif
+#ifndef PS_USE_NONE
*displen = (int) (ps_buffer_cur_len - ps_buffer_fixed_size);
return ps_buffer + ps_buffer_fixed_size;
+#else
+ return "";
+#endif
}