summaryrefslogtreecommitdiff
path: root/procps/ps.c
diff options
context:
space:
mode:
authorDenys Vlasenko2017-01-16 17:31:05 +0100
committerDenys Vlasenko2017-01-16 17:31:05 +0100
commit4e08a123b0f8c7d2c66583e84759b0974e791ee9 (patch)
tree3454632cecf1f6a042e6cb705432866cf83f358d /procps/ps.c
parent936e83e694b3225dbcc14fc99ca8053e2518ab35 (diff)
downloadbusybox-4e08a123b0f8c7d2c66583e84759b0974e791ee9.zip
busybox-4e08a123b0f8c7d2c66583e84759b0974e791ee9.tar.gz
Assorted warning fixes and added a comment, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps/ps.c')
-rw-r--r--procps/ps.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/procps/ps.c b/procps/ps.c
index 1d38059..e8b122c 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -608,7 +608,9 @@ int ps_main(int argc UNUSED_PARAM, char **argv)
procps_status_t *p;
llist_t* opt_o = NULL;
char default_o[sizeof(DEFAULT_O_STR)];
+#if ENABLE_SELINUX || ENABLE_FEATURE_SHOW_THREADS
int opt;
+#endif
enum {
OPT_Z = (1 << 0),
OPT_o = (1 << 1),
@@ -638,7 +640,11 @@ int ps_main(int argc UNUSED_PARAM, char **argv)
* procps v3.2.7 supports -T and shows tids as SPID column,
* it also supports -L where it shows tids as LWP column.
*/
- opt = getopt32(argv, "Zo:*aAdefl"IF_FEATURE_SHOW_THREADS("T"), &opt_o);
+#if ENABLE_SELINUX || ENABLE_FEATURE_SHOW_THREADS
+ opt =
+#endif
+ getopt32(argv, "Zo:*aAdefl"IF_FEATURE_SHOW_THREADS("T"), &opt_o);
+
if (opt_o) {
do {
parse_o(llist_pop(&opt_o));