neatmail icon indicating copy to clipboard operation
neatmail copied to clipboard

gcc 11 warning

Open polluks opened this issue 1 year ago • 0 comments

cc -c -Wall -O2 ex.c
ex.c: In function 'ex_exec':
ex.c:240:34: warning: '%s' directive output may be truncated writing up to 511 bytes into a region of size between 0 and 511 [-Wformat-truncation=]
   snprintf(hln, sizeof(hln), "%s %s\n", hdr, val);
                                  ^~          ~~~
ex.c:240:3: note: 'snprintf' output between 3 and 1025 bytes into a destination of size 512
   snprintf(hln, sizeof(hln), "%s %s\n", hdr, val);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

polluks avatar May 12 '23 11:05 polluks