~vcs-imports/screen/master

Viewing all changes in revision 1183.

  • Committer: Amadeusz Sławiński
  • Date: 2018-11-20 22:31:54 UTC
  • Revision ID: git-v1:a86b0c40d3445550f45e037604c8c784c776091e
get rid of Wformat-overflow warning

60 characters is plenty enough for reason string

window.c: In function ‘WindowDied’:
window.c:1941:33: warning: ‘%s’ directive writing up to 99 bytes into a region of size 86 [-Wformat-overflow=]
   sprintf(buf, "\n\r=== Command %s (%s) ===", reason, s ? s : "?");
                                 ^~            ~~~~~~
window.c:1941:16: note: assuming directive output of 1 byte
   sprintf(buf, "\n\r=== Command %s (%s) ===", reason, s ? s : "?");
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:862,
                 from logfile.h:33,
                 from window.h:39,
                 from window.c:34:
/usr/include/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output 22 or more bytes (assuming 122) into a destination of size 100
   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       __bos (__s), __fmt, __va_arg_pack ());
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: