In file included from foo.c:3: In file included from /usr/include/poll.h:1: In file included from /usr/include/sys/poll.h:73: /usr/include/bits/poll2.h:43:9: warning: poll called with fds buffer too small file nfds entries [-Wuser-defined-warnings] return __poll_chk_warn (__fds, __nfds, __timeout, __bos (__fds)); ^ /usr/include/bits/poll2.h:33:3: note: from 'diagnose_if' attribute on '__poll_chk_warn': __warnattr ("poll called with fds buffer too small file nfds entries"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:4: In file included from /usr/include/sys/socket.h:269: /usr/include/bits/socket2.h:42:9: warning: recv called with bigger length than size of destination buffer [-Wuser-defined-warnings] return __recv_chk_warn (__fd, __buf, __n, __bos0 (__buf), __flags); ^ /usr/include/bits/socket2.h:30:6: note: from 'diagnose_if' attribute on '__recv_chk_warn': __warnattr ("recv called with bigger length than size of destination " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:4: In file included from /usr/include/sys/socket.h:269: /usr/include/bits/socket2.h:73:9: warning: recvfrom called with bigger length than size of destination buffer [-Wuser-defined-warnings] return __recvfrom_chk_warn (__fd, __buf, __n, __bos0 (__buf), __flags, ^ /usr/include/bits/socket2.h:60:6: note: from 'diagnose_if' attribute on '__recvfrom_chk_warn': __warnattr ("recvfrom called with bigger length than size of " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:5: In file included from /usr/include/stdio.h:867: /usr/include/bits/stdio2.h:263:9: warning: fgets called with bigger size than length of destination buffer [-Wuser-defined-warnings] return __fgets_chk_warn (__s, __bos (__s), __n, __stream); ^ /usr/include/bits/stdio2.h:251:12: note: from 'diagnose_if' attribute on '__fgets_chk_warn': __wur __warnattr ("fgets called with bigger size than length " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:5: In file included from /usr/include/stdio.h:867: /usr/include/bits/stdio2.h:295:9: warning: fread called with bigger size * nmemb than length of destination buffer [-Wuser-defined-warnings] return __fread_chk_warn (__ptr, __bos0 (__ptr), __size, __n, __stream); ^ /usr/include/bits/stdio2.h:280:12: note: from 'diagnose_if' attribute on '__fread_chk_warn': __wur __warnattr ("fread called with bigger size * nmemb than length " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:5: In file included from /usr/include/stdio.h:867: /usr/include/bits/stdio2.h:357:9: warning: fread_unlocked called with bigger size * nmemb than length of destination buffer [-Wuser-defined-warnings] return __fread_unlocked_chk_warn (__ptr, __bos0 (__ptr), __size, __n, ^ /usr/include/bits/stdio2.h:341:12: note: from 'diagnose_if' attribute on '__fread_unlocked_chk_warn': __wur __warnattr ("fread_unlocked called with bigger size * nmemb than " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:6: In file included from /usr/include/stdlib.h:1017: /usr/include/bits/stdlib.h:71:9: warning: ptsname_r called with buflen bigger than size of buf [-Wuser-defined-warnings] return __ptsname_r_chk_warn (__fd, __buf, __buflen, __bos (__buf)); ^ /usr/include/bits/stdlib.h:60:22: note: from 'diagnose_if' attribute on '__ptsname_r_chk_warn': __nonnull ((2)) __warnattr ("ptsname_r called with buflen bigger than " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:6: In file included from /usr/include/stdlib.h:1017: /usr/include/bits/stdlib.h:123:9: warning: mbstowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wuser-defined-warnings] return __mbstowcs_chk_warn (__dst, __src, __len, ^ /usr/include/bits/stdlib.h:109:6: note: from 'diagnose_if' attribute on '__mbstowcs_chk_warn': __warnattr ("mbstowcs called with dst buffer smaller than len " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:6: In file included from /usr/include/stdlib.h:1017: /usr/include/bits/stdlib.h:152:9: warning: wcstombs called with dst buffer smaller than len [-Wuser-defined-warnings] return __wcstombs_chk_warn (__dst, __src, __len, __bos (__dst)); ^ /usr/include/bits/stdlib.h:141:6: note: from 'diagnose_if' attribute on '__wcstombs_chk_warn': __warnattr ("wcstombs called with dst buffer smaller than len"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:7: In file included from /usr/include/string.h:494: /usr/include/bits/string_fortified.h:67:7: warning: memset used with constant zero length parameter; this could be due to transposed parameters [-Wuser-defined-warnings] __warn_memset_zero_len (); ^ /usr/include/bits/string_fortified.h:26:1: note: from 'diagnose_if' attribute on '__warn_memset_zero_len': __warndecl (__warn_memset_zero_len, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:134:42: note: expanded from macro '__warndecl' extern void name (void) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:10: In file included from /usr/include/unistd.h:1166: /usr/include/bits/unistd.h:42:9: warning: read called with bigger length than size of the destination buffer [-Wuser-defined-warnings] return __read_chk_warn (__fd, __buf, __nbytes, __bos0 (__buf)); ^ /usr/include/bits/unistd.h:30:12: note: from 'diagnose_if' attribute on '__read_chk_warn': __wur __warnattr ("read called with bigger length than size of " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:10: In file included from /usr/include/unistd.h:1166: /usr/include/bits/unistd.h:148:9: warning: readlink called with bigger length than size of destination buffer [-Wuser-defined-warnings] return __readlink_chk_warn (__path, __buf, __len, __bos (__buf)); ^ /usr/include/bits/unistd.h:135:31: note: from 'diagnose_if' attribute on '__readlink_chk_warn': __nonnull ((1, 2)) __wur __warnattr ("readlink called with bigger length " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:10: In file included from /usr/include/unistd.h:1166: /usr/include/bits/unistd.h:182:9: warning: readlinkat called with bigger length than size of destination buffer [-Wuser-defined-warnings] return __readlinkat_chk_warn (__fd, __path, __buf, __len, ^ /usr/include/bits/unistd.h:168:31: note: from 'diagnose_if' attribute on '__readlinkat_chk_warn': __nonnull ((2, 3)) __wur __warnattr ("readlinkat called with bigger " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:10: In file included from /usr/include/unistd.h:1166: /usr/include/bits/unistd.h:208:9: warning: getcwd caller with bigger length than size of destination buffer [-Wuser-defined-warnings] return __getcwd_chk_warn (__buf, __size, __bos (__buf)); ^ /usr/include/bits/unistd.h:196:12: note: from 'diagnose_if' attribute on '__getcwd_chk_warn': __wur __warnattr ("getcwd caller with bigger length than size of " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:10: In file included from /usr/include/unistd.h:1166: /usr/include/bits/unistd.h:225:10: warning: please use getcwd instead, as getwd doesn't specify buffer size [-Wuser-defined-warnings] return __getwd_warn (__buf); ^ /usr/include/bits/unistd.h:217:28: note: from 'diagnose_if' attribute on '__getwd_warn': __nonnull ((1)) __wur __warnattr ("please use getcwd instead, as getwd " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:10: In file included from /usr/include/unistd.h:1166: /usr/include/bits/unistd.h:248:9: warning: confstr called with bigger length than size of destination buffer [-Wuser-defined-warnings] return __confstr_chk_warn (__name, __buf, __len, __bos (__buf)); ^ /usr/include/bits/unistd.h:236:6: note: from 'diagnose_if' attribute on '__confstr_chk_warn': __warnattr ("confstr called with bigger length than size of destination " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:10: In file included from /usr/include/unistd.h:1166: /usr/include/bits/unistd.h:273:9: warning: getgroups called with bigger group count than what can fit into destination buffer [-Wuser-defined-warnings] return __getgroups_chk_warn (__size, __list, __bos (__list)); ^ /usr/include/bits/unistd.h:261:12: note: from 'diagnose_if' attribute on '__getgroups_chk_warn': __wur __warnattr ("getgroups called with bigger group count than what " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:10: In file included from /usr/include/unistd.h:1166: /usr/include/bits/unistd.h:299:9: warning: ttyname_r called with bigger buflen than size of destination buffer [-Wuser-defined-warnings] return __ttyname_r_chk_warn (__fd, __buf, __buflen, __bos (__buf)); ^ /usr/include/bits/unistd.h:287:22: note: from 'diagnose_if' attribute on '__ttyname_r_chk_warn': __nonnull ((2)) __warnattr ("ttyname_r called with bigger buflen than " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:10: In file included from /usr/include/unistd.h:1166: /usr/include/bits/unistd.h:325:9: warning: getlogin_r called with bigger buflen than size of destination buffer [-Wuser-defined-warnings] return __getlogin_r_chk_warn (__buf, __buflen, __bos (__buf)); ^ /usr/include/bits/unistd.h:313:22: note: from 'diagnose_if' attribute on '__getlogin_r_chk_warn': __nonnull ((1)) __warnattr ("getlogin_r called with bigger buflen than " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:10: In file included from /usr/include/unistd.h:1166: /usr/include/bits/unistd.h:352:9: warning: gethostname called with bigger buflen than size of destination buffer [-Wuser-defined-warnings] return __gethostname_chk_warn (__buf, __buflen, __bos (__buf)); ^ /usr/include/bits/unistd.h:340:22: note: from 'diagnose_if' attribute on '__gethostname_chk_warn': __nonnull ((1)) __warnattr ("gethostname called with bigger buflen than " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:10: In file included from /usr/include/unistd.h:1166: /usr/include/bits/unistd.h:381:9: warning: getdomainname called with bigger buflen than size of destination buffer [-Wuser-defined-warnings] return __getdomainname_chk_warn (__buf, __buflen, __bos (__buf)); ^ /usr/include/bits/unistd.h:368:28: note: from 'diagnose_if' attribute on '__getdomainname_chk_warn': __nonnull ((1)) __wur __warnattr ("getdomainname called with bigger " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:11: In file included from /usr/include/wchar.h:848: /usr/include/bits/wchar2.h:49:9: warning: wmemcpy called with length bigger than size of destination buffer [-Wuser-defined-warnings] return __wmemcpy_chk_warn (__s1, __s2, __n, ^ /usr/include/bits/wchar2.h:35:6: note: from 'diagnose_if' attribute on '__wmemcpy_chk_warn': __warnattr ("wmemcpy called with length bigger than size of destination " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:11: In file included from /usr/include/wchar.h:848: /usr/include/bits/wchar2.h:77:9: warning: wmemmove called with length bigger than size of destination buffer [-Wuser-defined-warnings] return __wmemmove_chk_warn (__s1, __s2, __n, ^ /usr/include/bits/wchar2.h:64:6: note: from 'diagnose_if' attribute on '__wmemmove_chk_warn': __warnattr ("wmemmove called with length bigger than size of destination " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:11: In file included from /usr/include/wchar.h:848: /usr/include/bits/wchar2.h:137:9: warning: wmemset called with length bigger than size of destination buffer [-Wuser-defined-warnings] return __wmemset_chk_warn (__s, __c, __n, ^ /usr/include/bits/wchar2.h:125:6: note: from 'diagnose_if' attribute on '__wmemset_chk_warn': __warnattr ("wmemset called with length bigger than size of destination " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:11: In file included from /usr/include/wchar.h:848: /usr/include/bits/wchar2.h:200:9: warning: wcsncpy called with length bigger than size of destination buffer [-Wuser-defined-warnings] return __wcsncpy_chk_warn (__dest, __src, __n, ^ /usr/include/bits/wchar2.h:187:6: note: from 'diagnose_if' attribute on '__wcsncpy_chk_warn': __warnattr ("wcsncpy called with length bigger than size of destination " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:11: In file included from /usr/include/wchar.h:848: /usr/include/bits/wchar2.h:231:9: warning: wcpncpy called with length bigger than size of destination buffer [-Wuser-defined-warnings] return __wcpncpy_chk_warn (__dest, __src, __n, ^ /usr/include/bits/wchar2.h:218:6: note: from 'diagnose_if' attribute on '__wcpncpy_chk_warn': __warnattr ("wcpncpy called with length bigger than size of destination " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:11: In file included from /usr/include/wchar.h:848: /usr/include/bits/wchar2.h:393:9: warning: fgetws called with bigger size than length of destination buffer [-Wuser-defined-warnings] return __fgetws_chk_warn (__s, __bos (__s) / sizeof (wchar_t), ^ /usr/include/bits/wchar2.h:380:12: note: from 'diagnose_if' attribute on '__fgetws_chk_warn': __wur __warnattr ("fgetws called with bigger size than length " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:11: In file included from /usr/include/wchar.h:848: /usr/include/bits/wchar2.h:484:9: warning: mbsrtowcs called with dst buffer smaller than len * sizeof (wchar_t) [-Wuser-defined-warnings] return __mbsrtowcs_chk_warn (__dst, __src, __len, __ps, ^ /usr/include/bits/wchar2.h:470:6: note: from 'diagnose_if' attribute on '__mbsrtowcs_chk_warn': __warnattr ("mbsrtowcs called with dst buffer smaller than len " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ In file included from foo.c:11: In file included from /usr/include/wchar.h:848: /usr/include/bits/wchar2.h:517:9: warning: wcsrtombs called with dst buffer smaller than len [-Wuser-defined-warnings] return __wcsrtombs_chk_warn (__dst, __src, __len, __ps, __bos (__dst)); ^ /usr/include/bits/wchar2.h:505:5: note: from 'diagnose_if' attribute on '__wcsrtombs_chk_warn': __warnattr ("wcsrtombs called with dst buffer smaller than len"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/cdefs.h:135:41: note: expanded from macro '__warnattr' # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) ^ ~ 29 warnings generated.