Atoptool / atop

System and process monitor for Linux
GNU General Public License v2.0
792 stars 109 forks source link

compile warnings in 2.9.0, -Wformat-security #264

Closed Zugschlus closed 1 year ago

Zugschlus commented 1 year ago
cc -g -O2 -ffile-prefix-map=/home/mh/packages/atop/build-area/atop-2.9.0=. -fstack-protector-strong -Wformat -Werror=format-security -O2 -I. -Wall -Wno-stringop-truncation -Wmissing-prototypes -Wmissing-declarations  -Wdate-time -D_FORTIFY_SOURCE=2  -c -o showlinux.o showlinux.c
drawbar.c: In function ‘drawevent’:
drawbar.c:2058:9: error: format not a string literal and no format arguments [-Werror=format-security]
 2058 |         mvwprintw(w->win, line, column, text);
      |         ^~~~~~~~~
drawbar.c: In function ‘headergetch’:
drawbar.c:2108:17: error: format not a string literal and no format arguments [-Werror=format-security]
 2108 |                 mvwprintw(headwin, 0, statcol, statusmsg);
      |                 ^~~~~~~~~
drawbar.c: In function ‘getwininput’:
drawbar.c:2331:9: error: format not a string literal and no format arguments [-Werror=format-security]
 2331 |         mvwprintw(mywin, 1, 1, prompt);
      |         ^~~~~~~~~

Is this intended? If not, could this be fixed, removing the warning?

Debian compiles with an option that treats all warnings as errors and thus would need tweaking to build this. I'd rather not do this.

Atoptool commented 1 year ago

This issue has been fixed already by pull request #262.