You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ uname -a
Linux dick 5.4.12-arch1-1 #1 SMP PREEMPT Tue, 14 Jan 2020 21:44:31 +0000 x86_64 GNU/Linux
$ gcc --version
gcc (GCC) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Лог make:
$ make
gcc --std=gnu99 -pedantic -Wall -Wextra -Werror -ggdb3 -Ilib -D_DEBUG -lncursesw -pthread -I /usr/include/ncursesw -Wimplicit-fallthrough=0 -DPROTOCOL_VERSION=`perl -lne '$a+=$_+$. for split//;END{print$a}' src/*` -c src/config.c -o bin/config.o
In file included from src/config.c:4:
src/config.c: In function ‘config_init’:
src/config.c:248:19: error: ‘%s’ directive output may be truncated writing up to 8191 bytes into a region of size 8177 [-Werror=format-truncation=]
248 | warnf("[info] Config: %s: not found.", buf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~
src/itmmorgue.h:68:34: note: in definition of macro ‘warnf’
68 | snprintf(___buf, BUFSIZ, fmt, __VA_ARGS__); \
| ^~~
src/config.c:248:35: note: format string is defined here
248 | warnf("[info] Config: %s: not found.", buf);
| ^~
In file included from src/config.c:4:
src/itmmorgue.h:68:9: note: ‘snprintf’ output between 28 and 8219 bytes into a destination of size 8192
68 | snprintf(___buf, BUFSIZ, fmt, __VA_ARGS__); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/config.c:248:13: note: in expansion of macro ‘warnf’
248 | warnf("[info] Config: %s: not found.", buf);
| ^~~~~
src/config.c:256:19: error: ‘%s’ directive output may be truncated writing up to 8191 bytes into a region of size 8177 [-Werror=format-truncation=]
256 | warnf("[info] Config: %s: not found.", buf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~
src/itmmorgue.h:68:34: note: in definition of macro ‘warnf’
68 | snprintf(___buf, BUFSIZ, fmt, __VA_ARGS__); \
| ^~~
src/config.c:256:35: note: format string is defined here
256 | warnf("[info] Config: %s: not found.", buf);
| ^~
In file included from src/config.c:4:
src/itmmorgue.h:68:9: note: ‘snprintf’ output between 28 and 8219 bytes into a destination of size 8192
68 | snprintf(___buf, BUFSIZ, fmt, __VA_ARGS__); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/config.c:256:13: note: in expansion of macro ‘warnf’
256 | warnf("[info] Config: %s: not found.", buf);
| ^~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:40: bin/config.o] Error 1
found by kk
The text was updated successfully, but these errors were encountered:
@zhmylove блин, я вчитался в код. Это из разряда implicit fallthrough, только ещё бредовее. Предупреждение о том, что функция, используемая по своему назначению может сработать так, как описывается в документации. Согласен, бредовый варнинг.
Лог make:
found by kk
The text was updated successfully, but these errors were encountered: