diff options
author | Kurtis Rader <krader@skepticism.us> | 2016-04-03 19:02:46 -0700 |
---|---|---|
committer | Kurtis Rader <krader@skepticism.us> | 2016-04-03 19:02:46 -0700 |
commit | 9dd6873e5855f69b01f2e3705a49a4231c992e71 (patch) | |
tree | 7fc073cc4780b381285567b1df1b6caf9966bb00 /src/proc.cpp | |
parent | 3f1fc332e7451187b1b9806f544bc8199fa412a8 (diff) |
lint: remove or comment out unused functions
Cppcheck has identified a lot of unused functions. This removes funcs that
are unlikely to ever be used. Others that might be useful for debugging I've
commented out with "#if 0".
Diffstat (limited to 'src/proc.cpp')
-rw-r--r-- | src/proc.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/proc.cpp b/src/proc.cpp index f5c833e2..1a0d6479 100644 --- a/src/proc.cpp +++ b/src/proc.cpp @@ -94,15 +94,21 @@ size_t job_iterator_t::count() const return this->job_list->size(); } +#if 0 +// This isn't used so the lint tools were complaining about its presence. I'm keeping it in the +// source because it could be useful for debugging. However, it would probably be better to add a +// verbose or debug option to the builtin `jobs` command. void print_jobs(void) { job_iterator_t jobs; job_t *j; - while ((j = jobs.next())) - { - printf("%p -> %ls -> (foreground %d, complete %d, stopped %d, constructed %d)\n", j, j->command_wcstr(), job_get_flag(j, JOB_FOREGROUND), job_is_completed(j), job_is_stopped(j), job_get_flag(j, JOB_CONSTRUCTED)); + while (j = jobs.next()) { + printf("%p -> %ls -> (foreground %d, complete %d, stopped %d, constructed %d)\n", + j, j->command_wcstr(), job_get_flag(j, JOB_FOREGROUND), job_is_completed(j), + job_is_stopped(j), job_get_flag(j, JOB_CONSTRUCTED)); } } +#endif int is_interactive_session=0; int is_subshell=0; |