gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"netstat-nat\" -DVERSION=\"1.4.10\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_NETDB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_ERRNO_H=1 -DHAVE_STRINGS_H=1 -
netstat-nat.c: In function ‘main’:
netstat-nat.c:283:42: warning: comparison between pointer and zero character constant [-Wpointer-compare]
283 | if (optarg == NULL || optarg == '\0') {
| ^~
netstat-nat.c:283:35: note: did you mean to dereference the pointer?
283 | if (optarg == NULL || optarg == '\0') {
| ^
netstat-nat.c: In function ‘get_protocol’:
netstat-nat.c:530:9: error: implicit declaration of function ‘string_search’ [-Werror=implicit-function-declaration]
530 | if (string_search(line, "tcp")) {
| ^~~~~~~~~~~~~
netstat-nat.c: In function ‘process_entry’:
netstat-nat.c:615:5: error: implicit declaration of function ‘search_first_hit’ [-Werror=implicit-function-declaration]
615 | search_first_hit("src=", line, srcip_f);
| ^~~~~~~~~~~~~~~~
netstat-nat.c:617:5: error: implicit declaration of function ‘search_sec_hit’ [-Werror=implicit-function-declaration]
617 | search_sec_hit("src=", line, srcip_s);
| ^~~~~~~~~~~~~~
netstat-nat.c: In function ‘xcalloc’:
netstat-nat.c:824:45: warning: format ‘%i’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
824 | printf("Could not allocate memory (%i bytes); %s.\n -- Exiting.\n", bufsize, strerror(errno));
| ~^ ~~~~~~~
| | |
| int size_t {aka long unsigned int}
| %li
netstat-nat.c: In function ‘xrealloc’:
netstat-nat.c:837:45: warning: format ‘%i’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
837 | printf("Could not allocate memory (%i bytes); %s.\n -- Exiting.\n", newbufsize, strerror(errno));
| ~^ ~~~~~~~~~~
| | |
| int size_t {aka long unsigned int}
| %li
netstat-nat.c: In function ‘main’:
netstat-nat.c:473:52: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
473 | snprintf(buf2, sizeof(buf2), "%s:%s", buf, pa[index][3]);
| ^
In file included from /usr/include/stdio.h:906,
from netstat-nat.h:28,
from netstat-nat.c:182:
In function ‘snprintf’,
inlined from ‘main’ at netstat-nat.c:473:10: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output 2 or more bytes (assuming 101) into a destination of size 100
54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netstat-nat.c: In function ‘main’:
netstat-nat.c:478:42: warning: ‘%-41s’ directive output may be truncated writing between 41 and 99 bytes into a region of size 50 [-Wformat-truncation=]
478 | snprintf(src , sizeof(src), "%-41s", buf2);
| ^~~~~ ~~~~
In function ‘snprintf’,
inlined from ‘main’ at netstat-nat.c:478:13: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output between 42 and 100 bytes into a destination of size 50
54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netstat-nat.c: In function ‘main’:
netstat-nat.c:482:52: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
482 | snprintf(buf2, sizeof(buf2), "%s:%s", buf, pa[index][4]);
| ^
In function ‘snprintf’,
inlined from ‘main’ at netstat-nat.c:482:10: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output 2 or more bytes (assuming 101) into a destination of size 100
54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netstat-nat.c: In function ‘main’:
netstat-nat.c:487:41: warning: ‘%-41s’ directive output may be truncated writing between 41 and 99 bytes into a region of size 50 [-Wformat-truncation=]
487 | snprintf(dst, sizeof(dst), "%-41s", buf2);
| ^~~~~ ~~~~
In function ‘snprintf’,
inlined from ‘main’ at netstat-nat.c:487:13: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output between 42 and 100 bytes into a destination of size 50
54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netstat-nat.c: In function ‘main’:
netstat-nat.c:492:56: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
492 | snprintf(buf2, sizeof(buf2), "%s:%s", buf, pa[index][7]);
| ^
In function ‘snprintf’,
inlined from ‘main’ at netstat-nat.c:492:18: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output 2 or more bytes (assuming 101) into a destination of size 100
54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netstat-nat.c: In function ‘main’:
netstat-nat.c:497:46: warning: ‘%-41s’ directive output may be truncated writing between 41 and 99 bytes into a region of size 50 [-Wformat-truncation=]
497 | snprintf(host, sizeof(dst), "%-41s", buf2);
| ^~~~~ ~~~~
In function ‘snprintf’,
inlined from ‘main’ at netstat-nat.c:497:3: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output between 42 and 100 bytes into a destination of size 50
54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netstat-nat.c: In function ‘main’:
netstat-nat.c:443:52: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
443 | snprintf(buf2, sizeof(buf2), "%s:%s", buf, pa[index][3]);
| ^
In function ‘snprintf’,
inlined from ‘main’ at netstat-nat.c:443:17: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output 2 or more bytes (assuming 101) into a destination of size 100
54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netstat-nat.c: In function ‘main’:
netstat-nat.c:448:42: warning: ‘%-31s’ directive output may be truncated writing between 31 and 99 bytes into a region of size 50 [-Wformat-truncation=]
448 | snprintf(src, sizeof(src), "%-31s", buf2);
| ^~~~~ ~~~~
In function ‘snprintf’,
inlined from ‘main’ at netstat-nat.c:448:13: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output between 32 and 100 bytes into a destination of size 50
54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netstat-nat.c: In function ‘main’:
netstat-nat.c:452:52: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
452 | snprintf(buf2, sizeof(buf2), "%s:%s", buf, pa[index][4]);
| ^
In function ‘snprintf’,
inlined from ‘main’ at netstat-nat.c:452:17: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output 2 or more bytes (assuming 101) into a destination of size 100
54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netstat-nat.c: In function ‘main’:
netstat-nat.c:457:41: warning: ‘%-31s’ directive output may be truncated writing between 31 and 99 bytes into a region of size 50 [-Wformat-truncation=]
457 | snprintf(dst, sizeof(dst), "%-31s", buf2);
| ^~~~~ ~~~~
In function ‘snprintf’,
inlined from ‘main’ at netstat-nat.c:457:6: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output between 32 and 100 bytes into a destination of size 50
54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netstat-nat.c: In function ‘main’:
netstat-nat.c:462:56: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
462 | snprintf(buf2, sizeof(buf2), "%s:%s", buf, pa[index][7]);
| ^
In function ‘snprintf’,
inlined from ‘main’ at netstat-nat.c:462:18: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output 2 or more bytes (assuming 101) into a destination of size 100
54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
netstat-nat.c: In function ‘main’:
netstat-nat.c:467:46: warning: ‘%-31s’ directive output may be truncated writing between 31 and 99 bytes into a region of size 50 [-Wformat-truncation=]
467 | snprintf(host, sizeof(dst), "%-31s", buf2);
| ^~~~~ ~~~~
In function ‘snprintf’,
inlined from ‘main’ at netstat-nat.c:467:3: /usr/include/x86_64-linux-gnu/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output between 32 and 100 bytes into a destination of size 50
54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [Makefile:261: netstat-nat.o] Error 1
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 297 |
Nodes: | 16 (2 / 14) |
Uptime: | 04:23:47 |
Calls: | 6,666 |
Files: | 12,213 |
Messages: | 5,335,879 |