]> granicus.if.org Git - nethack/commitdiff
add -Wno-format-overflow to build under sys/unix/hints/linux.2020
authornhmall <nhmall@nethack.org>
Mon, 10 Aug 2020 03:33:55 +0000 (23:33 -0400)
committernhmall <nhmall@nethack.org>
Mon, 10 Aug 2020 03:33:55 +0000 (23:33 -0400)
Without that:

botl.c: In function ‘status_hilite2str’:
botl.c:3236:24: warning: ‘/’ directive writing 1 byte into a region of size between 0 and 255 [-Wformat-overflow=]
 3236 |     Sprintf(buf, "%s/%s/%s", initblstats[hl->fld].fldname, behavebuf, clrbuf);
      |                        ^
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from botl.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 3 or more bytes (assuming 513) into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
botl.c: In function ‘status_hilite_linestr_gather_conditions’:
botl.c:3134:48: warning: ‘%s’ directive writing up to 255 bytes into a region of size 245 [-Wformat-overflow=]
 3134 |                 Sprintf(condbuf, "condition/%s/%s",
      |                                                ^~
 3135 |                         conditionbitmask2str(cond_maps[i].bm), clrbuf);
      |                                                                ~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from botl.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 12 or more bytes (assuming 267) into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
botl.c: In function ‘do_statusline2’:
botl.c:229:37: warning: ‘%s’ directive writing up to 127 bytes into a region of size between 0 and 254 [-Wformat-overflow=]
  229 |             Sprintf(newbot2, "%s %s %s %s %s", hlth, cond, dloc, expr, tmmv);
      |                                     ^~                     ~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from botl.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 5 and 640 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
botl.c:227:37: warning: ‘%s’ directive writing up to 127 bytes into a region of size between 0 and 254 [-Wformat-overflow=]
  227 |             Sprintf(newbot2, "%s %s %s %s %s", dloc, hlth, cond, expr, tmmv);
      |                                     ^~                     ~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from botl.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 5 and 640 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
botl.c:225:37: warning: ‘%s’ directive writing up to 127 bytes into a region of size between 0 and 254 [-Wformat-overflow=]
  225 |             Sprintf(newbot2, "%s %s %s %s %s", dloc, hlth, expr, cond, tmmv);
      |                                     ^~                     ~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from botl.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 5 and 640 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
botl.c:219:33: warning: ‘%s’ directive writing up to 127 bytes into a region of size between 0 and 254 [-Wformat-overflow=]
  219 |         Sprintf(newbot2, "%s %s %s %s %s", dloc, hlth, expr, tmmv, cond);
      |                                 ^~                     ~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from botl.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 5 and 640 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
botl.c: In function ‘status_hilite_menu_add’:
botl.c:3726:38: warning: ‘ or ’ directive writing 4 bytes into a region of size between 1 and 80 [-Wformat-overflow=]
 3726 |                     Sprintf(obuf, "%s or %s",
      |                                      ^~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from botl.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 5 and 163 bytes into a destination of size 80
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cmd.c: In function ‘extcmd_via_menu’:
cmd.c:668:44: warning: ‘%s’ directive writing up to 127 bytes into a region of size 110 [-Wformat-overflow=]
  668 |         Sprintf(prompt, "Extended Command: %s", cbuf);
      |                                            ^~   ~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from cmd.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 19 and 146 bytes into a destination of size 128
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cmd.c: In function ‘paranoid_query’:
cmd.c:4488:30: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 113 and 128 [-Wformat-overflow=]
 4488 |             Sprintf(qbuf, "%s%s %s", promptprefix, pbuf, responsetype);
      |                              ^~                    ~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from cmd.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 282 bytes into a destination of size 128
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
do_name.c: In function ‘getpos_menu’:
do_name.c:612:37: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
  612 |             Sprintf(fullbuf, "%s%s%s", firstmatch,
      |                                     ^
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from do_name.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 1 or more bytes (assuming 257) into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
do_name.c: In function ‘getpos’:
do_name.c:205:31: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
  205 |         Sprintf(sbuf, "Type a %s when you are at the right place.", kbuf);
      |                               ^~                                    ~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from do_name.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 41 and 296 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
do_name.c:205:31: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
  205 |         Sprintf(sbuf, "Type a %s when you are at the right place.", kbuf);
      |                               ^~                                    ~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from do_name.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 41 and 296 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
do_wear.c: In function ‘armor_or_accessory_off’:
do_wear.c:1510:52: warning: ‘%s’ directive writing up to 127 bytes into a region of size 103 [-Wformat-overflow=]
 1510 |             Sprintf(why, " without taking off your %s first", what);
      |                                                    ^~         ~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from do_wear.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 32 and 159 bytes into a destination of size 128
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dungeon.c: In function ‘print_dungeon’:
dungeon.c:2156:27: warning: ‘%s’ directive writing up to 1407 bytes into a region of size 256 [-Wformat-overflow=]
 2156 |             Sprintf(buf, "%s: %s %d", dptr->dname, descr, dptr->depth_start);
      |                           ^~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from dungeon.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 1427 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dungeon.c:2153:27: warning: ‘%s’ directive writing up to 1407 bytes into a region of size 256 [-Wformat-overflow=]
 2153 |             Sprintf(buf, "%s: %s %d to %d", dptr->dname, makeplural(descr),
      |                           ^~
dungeon.c:2153:26: note: directive argument in the range [-21474836472147483646]
 2153 |             Sprintf(buf, "%s: %s %d to %d", dptr->dname, makeplural(descr),
      |                          ^~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from dungeon.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 10 or more bytes (assuming 1427) into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dungeon.c: In function ‘print_mapseen’:
dungeon.c:3191:33: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
 3191 |         Sprintf(outbuf, " (play %s to open or close drawbridge)", tmp);
      |                                 ^~                                ~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from dungeon.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 37 and 292 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dungeon.c:3352:35: warning: ‘%s’ directive writing up to 255 bytes into a region of size 240 [-Wformat-overflow=]
 3352 |         Sprintf(buf, "%sThe castle%s.", PREFIX, tunesuffix(mptr, tmpbuf));
      |                                   ^~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from dungeon.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 18 and 273 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dungeon.c:3403:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 242 [-Wformat-overflow=]
 3403 |                 Sprintf(buf, "%s%syou, %s%c", PREFIX, TAB, tmpbuf,
      |                                        ^~                  ~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from dungeon.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 16 and 271 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c: In function ‘edibility_prompts’:
eat.c:2359:25: warning: ‘ like ’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
 2359 |         Sprintf(buf, "%s like %s could be tainted!  %s", foodsmell, it_or_they,
      |                         ^~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 27 and 536 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2385:25: warning: ‘ like ’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
 2385 |         Sprintf(buf, "%s like %s might be poisonous!  %s", foodsmell,
      |                         ^~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 29 and 538 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2394:25: warning: ‘ like ’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
 2394 |         Sprintf(buf, "%s like %s might have been poisoned.  %s", foodsmell,
      |                         ^~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 35 and 544 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2400:25: warning: ‘ unhealthy.  ’ directive writing 13 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
 2400 |         Sprintf(buf, "%s unhealthy.  %s", foodsmell, eat_it_anyway);
      |                         ^~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 14 and 396 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2407:25: warning: ‘ rather acidic.  ’ directive writing 17 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
 2407 |         Sprintf(buf, "%s rather acidic.  %s", foodsmell, eat_it_anyway);
      |                         ^~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 18 and 400 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2415:25: warning: ‘ disgusting to you right now...’ directive writing 31 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
 2415 |         Sprintf(buf, "%s disgusting to you right now.  %s", foodsmell,
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 32 and 414 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2430:25: warning: ‘ foul and unfamiliar to you...’ directive writing 30 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
 2430 |         Sprintf(buf, "%s foul and unfamiliar to you.  %s", foodsmell,
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 31 and 413 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2450:25: warning: ‘ like ’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
 2450 |         Sprintf(buf, "%s like %s could be tainted!  %s",
      |                         ^~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 27 and 536 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2441:25: warning: ‘ unfamiliar to you.  ’ directive writing 21 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
 2441 |         Sprintf(buf, "%s unfamiliar to you.  %s", foodsmell, eat_it_anyway);
      |                         ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 22 and 404 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2376:25: warning: ‘ like ’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
 2376 |         Sprintf(buf, "%s like %s could be rotten! %s",  foodsmell, it_or_they,
      |                         ^~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 25 and 534 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2367:25: warning: ‘ like ’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
 2367 |         Sprintf(buf, "%s like %s could be something very dangerous!  %s",
      |                         ^~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 44 and 553 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
explode.c: In function ‘explode’:
explode.c:539:69: warning: ‘%s’ directive writing up to 255 bytes into a region of size 236 [-Wformat-overflow=]
  539 |                     Sprintf(g.killer.name, "caught %sself in %s own %s", uhim(),
      |                                                                     ^~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from explode.c:5:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 21 or more bytes (assuming 276) into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hacklib.c: In function ‘yyyymmddhhmmss’:
hacklib.c:1089:28: warning: ‘%02d’ directive writing between 2 and 11 bytes into a region of size between 4 and 11 [-Wformat-overflow=]
 1089 |     Sprintf(datestr, "%04ld%02d%02d%02d%02d%02d", datenum, lt->tm_mon + 1,
      |                            ^~~~
hacklib.c:1089:22: note: directive argument in the range [-21474836472147483647]
 1089 |     Sprintf(datestr, "%04ld%02d%02d%02d%02d%02d", datenum, lt->tm_mon + 1,
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from hacklib.c:7:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 15 and 67 bytes into a destination of size 15
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
insight.c: In function ‘status_enlightenment’:
insight.c:1208:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 127 [-Wformat-overflow=]
 1208 |                         Sprintf(sfx, " %s", buf), buf[0] = '\0';
      |                                        ^~   ~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from insight.c:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 2 and 257 bytes into a destination of size 128
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
insight.c: In function ‘list_vanquished’:
insight.c:2464:39: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
 2464 |                 Sprintf(buftoo, "%*s%s", pfx, "", buf);
      |                                       ^
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from insight.c:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 1 and 261 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
insight.c: In function ‘background_enlightenment’:
insight.c:326:27: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 253 and 256 [-Wformat-overflow=]
  326 |         Sprintf(buf, "%s%s%s%s form", !final ? "currently " : "",
      |                           ^~
  327 |                 altphrasing ? just_an(anbuf, tmpbuf) : "in ",
  328 |                 tmpbuf, uasmon->mname);
      |                 ~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from insight.c:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 6 or more bytes (assuming 264) into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
insight.c:326:27: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 243 and 246 [-Wformat-overflow=]
  326 |         Sprintf(buf, "%s%s%s%s form", !final ? "currently " : "",
      |                           ^~
  327 |                 altphrasing ? just_an(anbuf, tmpbuf) : "in ",
  328 |                 tmpbuf, uasmon->mname);
      |                 ~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from insight.c:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 16 or more bytes (assuming 274) into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
insight.c:444:33: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 121 and 248 [-Wformat-overflow=]
  444 |         Sprintf(buf, "in %s, on %s", dgnbuf, tmpbuf);
      |                                 ^~           ~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from insight.c:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 391 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
insight.c:423:48: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 223 and 233 [-Wformat-overflow=]
  423 |         Sprintf(buf, "in the endgame, on the %s%s",
      |                                                ^~
  424 |                 !strncmp(tmpbuf, "Plane", 5) ? "Elemental " : "", tmpbuf);
      |                                                                   ~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from insight.c:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 24 and 289 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
insight.c: In function ‘enlightenment’:
insight.c:245:21: warning: ‘ the ’ directive writing 5 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
  245 |     Sprintf(buf, "%s the %s's attributes:", tmpbuf,
      |                     ^~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from insight.c:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 20 or more bytes (assuming 275) into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mhitm.c: In function ‘hitmm’:
mhitm.c:591:37: warning: ‘ squeezes’ directive writing 9 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
  591 |                     Sprintf(buf, "%s squeezes", magr_name);
      |                                     ^~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from mhitm.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 265 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mhitm.c:578:33: warning: ‘ stings’ directive writing 7 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
  578 |                 Sprintf(buf, "%s stings", magr_name);
      |                                 ^~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from mhitm.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 8 and 263 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mhitm.c:584:33: warning: ‘ touches’ directive writing 8 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
  584 |                 Sprintf(buf, "%s touches", magr_name);
      |                                 ^~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from mhitm.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 264 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mhitm.c:581:33: warning: ‘ butts’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
  581 |                 Sprintf(buf, "%s butts", magr_name);
      |                                 ^~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from mhitm.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 7 and 262 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mhitm.c:575:33: warning: ‘ bites’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
  575 |                 Sprintf(buf, "%s bites", magr_name);
      |                                 ^~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from mhitm.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 7 and 262 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mhitm.c:597:37: warning: ‘ hits’ directive writing 5 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
  597 |                     Sprintf(buf, "%s hits", magr_name);
      |                                     ^~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from mhitm.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 6 and 261 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
options.c: In function ‘option_help’:
options.c:8035:28: warning: ‘ - ’ directive writing 3 bytes into a region of size between 1 and 236 [-Wformat-overflow=]
 8035 |         Sprintf(buf, "%-20s - %s%c", buf2, allopt[i].descr,
      |                            ^~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from options.c:14:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 25 or more bytes (assuming 260) into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pager.c: In function ‘do_screen_description’:
pager.c:1189:38: warning: ‘%s’ directive writing up to 255 bytes into a region of size 254 [-Wformat-overflow=]
 1187 |             *firstmatch = look_buf;
      |                           ~~~~~~~~
 1188 |             if (*(*firstmatch)) {
 1189 |                 Sprintf(temp_buf, " (%s)", *firstmatch);
      |                                      ^~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from pager.c:9:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 4 and 259 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pager.c:1195:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
 1195 |                 Sprintf(temp_buf, " [seen: %s]", monbuf);
      |                                            ^~    ~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from pager.c:9:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 265 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
potion.c: In function ‘dodip’:
potion.c:1949:26: warning: ‘%s’ directive writing up to 127 bytes into a region of size 124 [-Wformat-overflow=]
 1949 |         Sprintf(qbuf, "%s%s into the %s?", Dip_,
      |                          ^~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from potion.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 16 or more bytes (assuming 143) into a destination of size 128
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
potion.c:1939:26: warning: ‘%s’ directive writing up to 127 bytes into a region of size 124 [-Wformat-overflow=]
 1939 |         Sprintf(qbuf, "%s%s into the fountain?", Dip_,
      |                          ^~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from potion.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 24 and 151 bytes into a destination of size 128
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
potion.c:1969:24: warning: ‘%s’ directive writing up to 127 bytes into a region of size 124 [-Wformat-overflow=]
 1969 |     Sprintf(qbuf, "dip %s into", flags.verbose ? obuf : shortestname);
      |                        ^~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from potion.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 137 bytes into a destination of size 128
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
potion.c: In function ‘potionhit’:
potion.c:1424:41: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
 1424 |             Sprintf(saddle_glows, "%s %s", buf, aobjnam(saddle, "glow"));
      |                                         ^
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from potion.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 2 or more bytes (assuming 257) into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
spell.c: In function ‘getspell’:
spell.c:706:47: warning: ‘%s’ directive writing up to 255 bytes into a region of size 109 [-Wformat-overflow=]
  706 |             Sprintf(qbuf, "Cast which spell? [%s *?]", lets);
      |                                               ^~       ~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from spell.c:5:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 24 and 279 bytes into a destination of size 128
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
topten.c: In function ‘outentry’:
topten.c:1060:32: warning: ‘%s’ directive writing up to 255 bytes into a region of size 240 [-Wformat-overflow=]
 1060 |         Sprintf(linebuf, "%15s %s", "", linebuf3);
      |                                ^~       ~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from topten.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 17 and 272 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
trap.c: In function ‘untrap’:
trap.c:4462:58: warning: ‘%s’ directive writing up to 255 bytes into a region of size 88 [-Wformat-overflow=]
 4462 |                         qbuf, "There %s and %s here.  %s %s?",
      |                                                          ^~
......
 4465 |                         (ttmp->ttyp == WEB) ? "Remove" : "Disarm", the_trap);
      |                                                                    ~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from trap.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 42 or more bytes (assuming 297) into a destination of size 128
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
uhitm.c: In function ‘hmon_hitmon’:
uhitm.c:1316:47: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 244 and 251 [-Wformat-overflow=]
 1316 |                 Sprintf(silverobjbuf, "Your %s%s %s",
      |                                               ^~
 1317 |                         strstri(saved_oname, "silver") ? "" : "silver ",
 1318 |                         saved_oname, vtense(saved_oname, "sear"));
      |                         ~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from uhitm.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 7 or more bytes (assuming 269) into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
weapon.c: In function ‘enhance_weapon_skill’:
weapon.c:1271:47: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 249 and 253 [-Wformat-overflow=]
 1271 |                         Sprintf(buf, " %s%s\t[%s]", prefix, P_NAME(i),
      |                                               ^~
 1272 |                                 sklnambuf);
      |                                 ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from weapon.c:11:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 5 or more bytes (assuming 264) into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
weapon.c:1268:49: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 248 and 252 [-Wformat-overflow=]
 1268 |                         Sprintf(buf, " %s %-*s [%s]", prefix, longest,
      |                                                 ^~
 1269 |                                 P_NAME(i), sklnambuf);
      |                                            ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from weapon.c:11:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 6 or more bytes (assuming 265) into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
weapon.c:1263:46: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 250 and 254 [-Wformat-overflow=]
 1263 |                         Sprintf(buf, " %s%s\t%s\t%5d(%4d)", prefix, P_NAME(i),
      |                                              ^~
 1264 |                                 sklnambuf, P_ADVANCE(i),
      |                                 ~~~~~~~~~
weapon.c:1263:38: note: directive argument in the range [0, 65535]
 1263 |                         Sprintf(buf, " %s%s\t%s\t%5d(%4d)", prefix, P_NAME(i),
      |                                      ^~~~~~~~~~~~~~~~~~~~~
weapon.c:1263:38: note: directive argument in the range [-325120, 327680]
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from weapon.c:11:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 15 or more bytes (assuming 277) into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
weapon.c:1259:47: warning: ‘%-12s’ directive writing between 12 and 255 bytes into a region of size between 250 and 254 [-Wformat-overflow=]
 1259 |                         Sprintf(buf, " %s%-*s %-12s %5d(%4d)", prefix,
      |                                               ^~~~~
 1260 |                                 longest, P_NAME(i), sklnambuf, P_ADVANCE(i),
      |                                                     ~~~~~~~~~
weapon.c:1259:38: note: directive argument in the range [0, 65535]
 1259 |                         Sprintf(buf, " %s%-*s %-12s %5d(%4d)", prefix,
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
weapon.c:1259:38: note: directive argument in the range [-325120, 327680]
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from weapon.c:11:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 27 or more bytes (assuming 277) into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../win/curses/cursinit.c: In function ‘curses_choose_character’:
../win/curses/cursinit.c:454:26: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
  454 |     sprintf(choice, "%s%c", tmpchoice, '\033');
      |                          ^
In file included from /usr/include/stdio.h:867,
                 from /usr/include/curses.h:192,
                 from ../win/curses/cursinit.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 2 and 129 bytes into a destination of size 128
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../win/X11/winX.c: In function ‘X11_init_nhwindows’:
../win/X11/winX.c:1509:12: warning: ignoring return value of ‘seteuid’, declared with attribute warn_unused_result [-Wunused-result]
 1509 |     (void) seteuid(getuid());
      |            ^~~~~~~~~~~~~~~~~
../win/X11/winX.c:1570:12: warning: ignoring return value of ‘seteuid’, declared with attribute warn_unused_result [-Wunused-result]
 1570 |     (void) seteuid(savuid);
      |            ^~~~~~~~~~~~~~~
../win/tty/wintty.c: In function ‘tty_player_selection’:
../win/tty/wintty.c:964:30: warning: ‘%s’ directive writing up to 127 bytes into a region of size between 95 and 126 [-Wformat-overflow=]
  964 |         Sprintf(pbuf, "%s, %s%s %s %s", g.plname, aligns[ALGN].adj, plbuf,
      |                              ^~                                     ~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from ../win/tty/wintty.c:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 5 or more bytes (assuming 163) into a destination of size 128
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
version.c: In function ‘early_version_info’:
version.c:263:24: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
  263 |     Sprintf(buf2, "%s\n", buf);
      |                        ^
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from version.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 2 and 257 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
version.c:263:24: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
  263 |     Sprintf(buf2, "%s\n", buf);
      |                        ^
In file included from /usr/include/stdio.h:867,
                 from ../include/global.h:9,
                 from ../include/config.h:608,
                 from ../include/hack.h:10,
                 from version.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 2 and 257 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

sys/unix/hints/linux.2020

index 0472d13afefcfb5ba72c121a2264cd86c8678064..5371c0c839c82da6ac2c9569b3d43133691a1fc6 100755 (executable)
@@ -1,5 +1,5 @@
 #
-# NetHack 3.7  linux.2020 $NHDT-Date: 1596498415 2020/08/03 23:46:55 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.32 $
+# NetHack 3.7  linux.2020 $NHDT-Date: 1597029501 2020/08/10 03:18:21 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $
 # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
 # NetHack may be freely redistributed.  See license for details. 
 #
@@ -132,6 +132,7 @@ endif
 endif
 
 CFLAGS=-g -O -I../include -DNOTPARMDECL
+CFLAGS+=-Wno-format-overflow
 CFLAGS+=-DDLB
 CFLAGS+=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
 CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE