pstree: fix "warning: 'handle_thread' defined but not used"
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 27 Mar 2011 14:15:02 +0000 (16:15 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 27 Mar 2011 14:15:02 +0000 (16:15 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
procps/pstree.c

index 4cd8cb458c78eedc35d410d19f66db4350ee6d0b..16649cfaa46ed64521bc86b6265f1f2c8be63b55 100644 (file)
@@ -339,12 +339,14 @@ static void dump_by_user(PROC *current, uid_t uid)
                dump_by_user(walk->child, uid);
 }
 
+#if ENABLE_FEATURE_SHOW_THREADS
 static void handle_thread(const char *comm, pid_t pid, pid_t ppid, uid_t uid)
 {
        char threadname[COMM_LEN + 2];
        sprintf(threadname, "{%.*s}", COMM_LEN - 2, comm);
        add_proc(threadname, pid, ppid, uid/*, 1*/);
 }
+#endif
 
 static void mread_proc(void)
 {