]> granicus.if.org Git - procps-ng/commit
misc: eliminate a couple of miscellaneous gcc warnings
authorJim Warner <james.warner@comcast.net>
Sat, 25 Jul 2020 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Wed, 29 Jul 2020 08:58:33 +0000 (18:58 +1000)
commite3196502784b11c70d6e3c33159403d2f7c118e1
treee165135c9a1985eeabd4b1c867bc6dcb14ab4668
parent71d49f168a0935e6ca5514e926b0af91398e498d
misc: eliminate a couple of miscellaneous gcc warnings

This commit just addresses those warnings shown below.

Reference(s):
proc/sysinfo.c: In function `getrunners':
proc/sysinfo.c:491:26: warning: `%s' directive writing up to 255 bytes into a region of size 26 [-Wformat-overflow=]
  491 |     sprintf(tbuf, "/proc/%s/stat", ent->d_name);
      |                          ^~

pgrep.c: In function `select_procs':
pgrep.c:591:11: warning: suggest explicit braces to avoid ambiguous `else' [-Wdangling-else]
  591 |   else if (opt_older)
      |           ^

Signed-off-by: Jim Warner <james.warner@comcast.net>
pgrep.c
proc/sysinfo.c