=> Bootstrap dependency digest>=20010302: found digest-20190127 WARNING: [license.mk] Every package should define a LICENSE. ===> Skipping vulnerability checks. WARNING: No /var/db/pkg/pkg-vulnerabilities file found. WARNING: To fix run: `/usr/sbin/pkg_admin -K /var/db/pkg fetch-pkg-vulnerabilities'. ===> Building for netramet-4.4.20nb1 cd src/snmplib; /usr/bin/make clang -O2 -I/usr/include -I../../src/snmplib -I../.. -DNETBSD -DHAVE_CONFIG_H -c ../../src/snmplib/asn1.c clang -O2 -I/usr/include -I../../src/snmplib -I../.. -DNETBSD -DHAVE_CONFIG_H -c ../../src/snmplib/mib.c ../../src/snmplib/mib.c:179:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] static parse_subtree(struct tree *subtree, ~~~~~~ ^ ../../src/snmplib/mib.c:392:31: warning: format specifies type 'unsigned long' but the argument has type 'Int32' (aka 'int') [-Wformat] sprintf(buf, "Gauge: %lu", *var->val.integer); ~~~ ^~~~~~~~~~~~~~~~~ %d ../../src/snmplib/mib.c:404:24: warning: format specifies type 'unsigned long' but the argument has type 'Int32' (aka 'int') [-Wformat] sprintf(buf, "%lu", *var->val.integer); ~~~ ^~~~~~~~~~~~~~~~~ %d ../../src/snmplib/mib.c:449:29: warning: format specifies type 'unsigned long' but the argument has type 'Int32' (aka 'int') [-Wformat] sprintf(buf, "INT: %lu", *var->val.integer); ~~~ ^~~~~~~~~~~~~~~~~ %d ../../src/snmplib/mib.c:795:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] static parse_subtree(struct tree *subtree, ~~~~~~ ^ 5 warnings generated. clang -O2 -I/usr/include -I../../src/snmplib -I../.. -DNETBSD -DHAVE_CONFIG_H -c ../../src/snmplib/parse.c clang -O2 -I/usr/include -I../../src/snmplib -I../.. -DNETBSD -DHAVE_CONFIG_H -c ../../src/snmplib/snmp.c clang -O2 -I/usr/include -I../../src/snmplib -I../.. -DNETBSD -DHAVE_CONFIG_H -c ../../src/snmplib/snmpapi.c ../../src/snmplib/snmpapi.c:453:19: warning: implicit declaration of function 'inet_addr' is invalid in C99 [-Wimplicit-function-declaration] if ((addr = inet_addr(session->peername)) != -1) { ^ ../../src/snmplib/snmpapi.c:553:3: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(slp->internal->sd); ^ ../../src/snmplib/snmpapi.c:1102:10: warning: implicit declaration of function 'inet_ntoa' is invalid in C99 [-Wimplicit-function-declaration] inet_ntoa(pdu->address.sin_addr)); ^ ../../src/snmplib/snmpapi.c:1102:10: warning: format specifies type 'char *' but the argument has type 'int' [-Wformat] inet_ntoa(pdu->address.sin_addr)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/snmplib/snmpapi.c:1270:32: warning: passing 'int *' to parameter of type '__socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] (struct sockaddr *)&from, &fromlength); ^~~~~~~~~~~ /usr/include/sys/socket.h:633:58: note: passing argument to parameter here struct sockaddr * __restrict, socklen_t * __restrict); ^ ../../src/snmplib/snmpapi.c:1290:9: warning: implicit declaration of function 'inet_ntoa' is invalid in C99 [-Wimplicit-function-declaration] inet_ntoa(from.sin_addr)); ^ ../../src/snmplib/snmpapi.c:1290:9: warning: format specifies type 'char *' but the argument has type 'int' [-Wformat] inet_ntoa(from.sin_addr)); ^~~~~~~~~~~~~~~~~~~~~~~~ ../../src/snmplib/snmpapi.c:1582:8: warning: implicit declaration of function 'inet_ntoa' is invalid in C99 [-Wimplicit-function-declaration] inet_ntoa(rp->pdu->address.sin_addr)); ^ ../../src/snmplib/snmpapi.c:1582:8: warning: format specifies type 'char *' but the argument has type 'int' [-Wformat] inet_ntoa(rp->pdu->address.sin_addr)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 9 warnings generated. clang -O2 -I/usr/include -I../../src/snmplib -I../.. -DNETBSD -DHAVE_CONFIG_H -c ../../src/snmplib/snmpagnt.c clang -O2 -I/usr/include -I../../src/snmplib -I../.. -DNETBSD -DHAVE_CONFIG_H -c ../../src/snmplib/snmpauth.c clang -O2 -I/usr/include -I../../src/snmplib -I../.. -DNETBSD -DHAVE_CONFIG_H -c ../../src/snmplib/snmpclnt.c ar r libsnmp.a asn1.o mib.o parse.o snmp.o snmpapi.o snmpagnt.o snmpauth.o snmpclnt.o ar: creating libsnmp.a ranlib libsnmp.a cd src/apps; /usr/bin/make clang -O2 -I/usr/include -I../../src/snmplib -I../.. -DNETBSD -DHAVE_CONFIG_H -c ../../src/apps/snmptest.c ../../src/apps/snmptest.c:131:11: warning: format string is not a string literal (potentially insecure) [-Wformat-security] printf(msg); fflush(stdout); ^~~ ../../src/apps/snmptest.c:131:11: note: treat the string as an argument to avoid this printf(msg); fflush(stdout); ^ "%s", ../../src/apps/snmptest.c:152:4: warning: implicit declaration of function 'init_mib' is invalid in C99 [-Wimplicit-function-declaration] init_mib(); ^ ../../src/apps/snmptest.c:244:17: warning: implicit declaration of function 'input_variable' is invalid in C99 [-Wimplicit-function-declaration] while ((ret = input_variable(vp)) == -1) ^ ../../src/apps/snmptest.c:334:29: warning: implicit declaration of function 'inet_ntoa' is invalid in C99 [-Wimplicit-function-declaration] printf("from %s\n", inet_ntoa(response->address.sin_addr)); ^ ../../src/apps/snmptest.c:334:29: warning: format specifies type 'char *' but the argument has type 'int' [-Wformat] printf("from %s\n", inet_ntoa(response->address.sin_addr)); ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %d ../../src/apps/snmptest.c:340:8: warning: implicit declaration of function 'print_variable' is invalid in C99 [-Wimplicit-function-declaration] print_variable(vars->name, vars->name_length, vars); ^ ../../src/apps/snmptest.c:352:4: warning: implicit declaration of function 'print_objid' is invalid in C99 [-Wimplicit-function-declaration] print_objid(vars->name, vars->name_length); ^ ../../src/apps/snmptest.c:386:28: warning: passing 'u_char *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign] subidentifier = atoi(cp); ^~ /usr/include/stdlib.h:101:23: note: passing argument to parameter here int atoi(const char *); ^ ../../src/apps/snmptest.c:413:14: warning: passing 'u_char *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign] sscanf(cp, "%x", &subidentifier); ^~ /usr/include/stdio.h:264:36: note: passing argument to parameter here int sscanf(const char * __restrict, const char * __restrict, ...) ^ ../../src/apps/snmptest.c:428:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] input_variable(struct variable_list *vp) ^ ../../src/apps/snmptest.c:489:9: warning: implicit declaration of function 'read_objid' is invalid in C99 [-Wimplicit-function-declaration] if (!read_objid(buf, name, &vp->name_length)) ^ ../../src/apps/snmptest.c:539:13: warning: passing 'u_char [256]' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] strcpy(value, buf); ^~~~~ /usr/include/string.h:58:31: note: passing argument to parameter here char *strcpy(char * __restrict, const char * __restrict); ^ ../../src/apps/snmptest.c:566:22: warning: implicit declaration of function 'inet_addr' is invalid in C99 [-Wimplicit-function-declaration] *(vp->val.u_int) = inet_addr(buf); ^ 13 warnings generated. clang -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -o snmptest snmptest.o -lresolv -lm ../../src/snmplib/libsnmp.a clang -O2 -I/usr/include -I../../src/snmplib -I../.. -DNETBSD -DHAVE_CONFIG_H -c ../../src/apps/snmpwalk.c ../../src/apps/snmpwalk.c:136:4: warning: implicit declaration of function 'init_mib' is invalid in C99 [-Wimplicit-function-declaration] init_mib(); ^ ../../src/apps/snmpwalk.c:173:7: warning: implicit declaration of function 'read_objid' is invalid in C99 [-Wimplicit-function-declaration] if (read_objid(argv[arg], root, &rootlen)) { ^ ../../src/apps/snmpwalk.c:232:5: warning: implicit declaration of function 'print_variable' is invalid in C99 [-Wimplicit-function-declaration] print_variable(vars->name, vars->name_length, vars); ^ ../../src/apps/snmpwalk.c:268:8: warning: implicit declaration of function 'print_objid' is invalid in C99 [-Wimplicit-function-declaration] print_objid(vars->name, vars->name_length); ^ 4 warnings generated. clang -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -o snmpwalk snmpwalk.o -lresolv -lm ../../src/snmplib/libsnmp.a clang -O2 -I/usr/include -I../../src/snmplib -I../.. -DNETBSD -DHAVE_CONFIG_H -c ../../src/apps/snmpbulkwalk.c ../../src/apps/snmpbulkwalk.c:137:4: warning: implicit declaration of function 'init_mib' is invalid in C99 [-Wimplicit-function-declaration] init_mib(); ^ ../../src/apps/snmpbulkwalk.c:177:7: warning: implicit declaration of function 'read_objid' is invalid in C99 [-Wimplicit-function-declaration] if (read_objid(argv[arg], root, &rootlen)) { ^ ../../src/apps/snmpbulkwalk.c:241:5: warning: implicit declaration of function 'print_variable' is invalid in C99 [-Wimplicit-function-declaration] print_variable(vars->name, vars->name_length, vars); ^ ../../src/apps/snmpbulkwalk.c:278:8: warning: implicit declaration of function 'print_objid' is invalid in C99 [-Wimplicit-function-declaration] print_objid(vars->name, vars->name_length); ^ 4 warnings generated. clang -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -o snmpbulkwalk snmpbulkwalk.o -lresolv -lm ../../src/snmplib/libsnmp.a cd src/bgp; /usr/bin/make clang -O2 -I/usr/include -I../../src/bgp/integrat -I../.. -DNETRAMET -DNF_OCX_BGP=1 -DNETBSD -DHAVE_CONFIG_H -c ../../src/bgp/integrat/readbgp.c ../../src/bgp/integrat/readbgp.c:175:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] static mask_from_length[ 33 ]; /* host byte order */ ~~~~~~ ^ ../../src/bgp/integrat/readbgp.c:239:13: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] MAX_USED_BGP_LINES * sizeof( Subnet ), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/bgp/integrat/readbgp.c:154:37: note: expanded from macro 'MAX_USED_BGP_LINES' #define MAX_USED_BGP_LINES min( (Bit32)100000, (Bit32)MAX_TREE_LEAVES ) ^ ../../src/bgp/integrat/readbgp.c:120:21: note: expanded from macro 'min' #define min(a,b) (((a) < (b)) ? (a) : (b)) ^ ../../src/bgp/integrat/readbgp.c:240:13: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] MAX_USED_BGP_LINES ^~~~~~~~~~~~~~~~~~ ../../src/bgp/integrat/readbgp.c:154:37: note: expanded from macro 'MAX_USED_BGP_LINES' #define MAX_USED_BGP_LINES min( (Bit32)100000, (Bit32)MAX_TREE_LEAVES ) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/bgp/integrat/readbgp.c:120:21: note: expanded from macro 'min' #define min(a,b) (((a) < (b)) ? (a) : (b)) ^~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/bgp/integrat/readbgp.c:706:126: warning: format specifies type 'char *' but the argument has type 'int' [-Wformat] fprintf( stderr, "internal error on line %d: nexthop IP address '%s' length %d was longer than expected %d\n", line, nexthop_width, NEXTHOP_IP_WIDTH ); ~~ ^~~~~~~~~~~~~ %d ../../src/bgp/integrat/readbgp.c:706:141: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] fprintf( stderr, "internal error on line %d: nexthop IP address '%s' length %d was longer than expected %d\n", line, nexthop_width, NEXTHOP_IP_WIDTH ); ~~ ^~~~~~~~~~~~~~~~ %lu ../../src/bgp/integrat/readbgp.c:166:37: note: expanded from macro 'NEXTHOP_IP_WIDTH' # define NEXTHOP_IP_WIDTH (sizeof("255.255.255.255")-1) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/bgp/integrat/readbgp.c:706:114: warning: more '%' conversions than data arguments [-Wformat] fprintf( stderr, "internal error on line %d: nexthop IP address '%s' length %d was longer than expected %d\n", line, nexthop_width, NEXTHOP_IP_WIDTH ); ~^ ../../src/bgp/integrat/readbgp.c:814:13: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] sizeof(Subnet), line, inet_ntoa(buffer,addr), bits_in_mask(htonl(mask)), exit_as, src_as, as_path ); ^~~~~~~~~~~~~~ ../../src/bgp/integrat/readbgp.c:839:88: warning: format specifies type 'unsigned int' but the argument has type 'Bit32' (aka 'unsigned long') [-Wformat] errno, _sys_errlist[errno], as_path_width+1, line, inet_ntoa(buffer,addr), mask, as_path ); ^~~~ ../../src/bgp/integrat/readbgp.c:1161:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] (GetSubnetNodeCount() - subnet_node_count_before) * sizeof(SubnetTree) + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/bgp/integrat/readbgp.c:1171:9: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] (GetSubnetNodeCount() - subnet_node_count_before) * sizeof(SubnetTree) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 10 warnings generated. clang -O2 -I/usr/include -I../../src/bgp/integrat -I../.. -DNETRAMET -DNF_OCX_BGP=1 -DNETBSD -DHAVE_CONFIG_H -c ../../src/bgp/integrat/subnet.c In file included from ../../src/bgp/integrat/subnet.c:377: ../../src/bgp/integrat/../integrat/subnetd.c:75:13: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] MAX_TREE_NODES * sizeof( SubnetTree ), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/bgp/integrat/../integrat/subnetd.h:23:29: note: expanded from macro 'MAX_TREE_NODES' #define MAX_TREE_NODES 4096 ^ In file included from ../../src/bgp/integrat/subnet.c:377: ../../src/bgp/integrat/../integrat/subnetd.c:440:9: warning: add explicit braces to avoid dangling else [-Wdangling-else] else ^ ../../src/bgp/integrat/../integrat/subnetd.c:486:67: warning: format specifies type 'int' but the argument has type 'Bit32' (aka 'unsigned long') [-Wformat] fprintf( stderr, "error: cannot insert subnet %d > %d\n", trial_node, MAX_TREE_NODES ); ~~ ^~~~~~~~~~ %lu ../../src/bgp/integrat/../integrat/subnetd.c:615:13: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] XLATE_PTR(external,external_base), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/bgp/integrat/../integrat/subnetd.h:34:33: note: expanded from macro 'XLATE_PTR' #define XLATE_PTR(ptr,base) ((POINTER_DATATYPE)(ptr) - (POINTER_DATATYPE)(base)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../../src/bgp/integrat/subnet.c:377: ../../src/bgp/integrat/../integrat/subnetd.c:627:90: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] fprintf( stderr, "error: DumpRawSubnetsRecurse() already visited node %d\n", node ); ~~ ^~~~ %lu ../../src/bgp/integrat/../integrat/subnetd.c:631:85: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] printf( "level %d node 0x%X\n", level_from_bits(addr_bits_left,level_bits), XLATE_PTR(PTR_FROM_NODE(node),subnet_base) ); ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %lX ../../src/bgp/integrat/../integrat/subnetd.h:34:33: note: expanded from macro 'XLATE_PTR' #define XLATE_PTR(ptr,base) ((POINTER_DATATYPE)(ptr) - (POINTER_DATATYPE)(base)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../../src/bgp/integrat/subnet.c:377: ../../src/bgp/integrat/../integrat/subnetd.c:648:49: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] printf( "%d:0x%X\n", count, XLATE_PTR_COND(node2,external_base,subnet_base) ); ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %lX ../../src/bgp/integrat/../integrat/subnetd.h:35:45: note: expanded from macro 'XLATE_PTR_COND' #define XLATE_PTR_COND(ptr,lbase,nbase) (IS_NODE_A_LEAF(ptr) ? XLATE_PTR(EXTERN_FROM_NODE(ptr),lbase) : XLATE_PTR(PTR_FROM_NODE(ptr),nbase)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../../src/bgp/integrat/subnet.c:377: ../../src/bgp/integrat/../integrat/subnetd.c:650:71: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] printf( "%d-%d:0x%X\n", count, future_node_num-1, XLATE_PTR_COND(node2,external_base,subnet_base) ); ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %lX ../../src/bgp/integrat/../integrat/subnetd.h:35:45: note: expanded from macro 'XLATE_PTR_COND' #define XLATE_PTR_COND(ptr,lbase,nbase) (IS_NODE_A_LEAF(ptr) ? XLATE_PTR(EXTERN_FROM_NODE(ptr),lbase) : XLATE_PTR(PTR_FROM_NODE(ptr),nbase)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../../src/bgp/integrat/subnet.c:377: ../../src/bgp/integrat/../integrat/subnetd.c:708:65: warning: format specifies type 'unsigned int' but the argument has type 'Bit32' (aka 'unsigned long') [-Wformat] printf( "(0x%.8X was subtracted from all node pointers)\n", subnet_base ); ~~~~ ^~~~~~~~~~~ %.8lX ../../src/bgp/integrat/../integrat/subnetd.c:709:65: warning: format specifies type 'unsigned int' but the argument has type 'Bit32' (aka 'unsigned long') [-Wformat] printf( "(0x%.8X was subtracted from all leaf pointers)\n", external_base ); ~~~~ ^~~~~~~~~~~~~ %.8lX 10 warnings generated. clang -O2 -I/usr/include -I../../src/bgp/integrat -I../.. -DNETRAMET -DNF_OCX_BGP=1 -DNETBSD -DHAVE_CONFIG_H -c ../../src/bgp/integrat/../wattcp/unixtcp.c ../../src/bgp/integrat/../wattcp/unixtcp.c:11:41: warning: '/*' within block comment [-Wcomment] #include /* memset() */ ^ 1 warning generated. ar r libbgp.a readbgp.o subnet.o unixtcp.o ar: creating libbgp.a ranlib libbgp.a cd src/srl; /usr/bin/make clang -I../../src/srl -I../.. -DNETBSD -DNETFLOW -DHAVE_CONFIG_H -c ../../src/srl/srl.c ../../src/srl/srl.c:475:7: warning: implicit declaration of function 'nextnb' is invalid in C99 [-Wimplicit-function-declaration] nextnb(); /* 1-char lookahead */ ^ ../../src/srl/srl.c:1093:4: warning: implicit declaration of function 'nextnb' is invalid in C99 [-Wimplicit-function-declaration] nextnb(); /* Enable 1-char lookahead! */ ^ ../../src/srl/srl.c:1294:14: warning: passing 'unsigned char *' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] strcpy(fbp, "\n"); ^~~ /usr/include/string.h:58:31: note: passing argument to parameter here char *strcpy(char * __restrict, const char * __restrict); ^ ../../src/srl/srl.c:1329:11: warning: passing 'unsigned char *' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] strcpy(fbp, ";\n"); ^~~ /usr/include/string.h:58:31: note: passing argument to parameter here char *strcpy(char * __restrict, const char * __restrict); ^ ../../src/srl/srl.c:1350:7: warning: implicit declaration of function 'nextnb' is invalid in C99 [-Wimplicit-function-declaration] nextnb(); /* Enable 1-char lookahead! */ ^ ../../src/srl/srl.c:1441:4: warning: implicit declaration of function 'init_symbol_table' is invalid in C99 [-Wimplicit-function-declaration] init_symbol_table(); ^ 6 warnings generated. clang -I../../src/srl -I../.. -DNETBSD -DNETFLOW -DHAVE_CONFIG_H -c ../../src/srl/srl_scan.c ../../src/srl/srl_scan.c:201:36: warning: '/*' within block comment [-Wcomment] char *gcstring(char *s, int *len) /* Get string from s */ ^ ../../src/srl/srl_scan.c:272:12: warning: passing 'unsigned char [50]' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] sprintf(b, "%u", v[0]); ^ /usr/include/stdio.h:275:31: note: passing argument to parameter here int sprintf(char * __restrict, const char * __restrict, ...) ^ ../../src/srl/srl_scan.c:277:15: warning: passing 'unsigned char [50]' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] sprintf(b, ".%u", v[j]); ^ /usr/include/stdio.h:275:31: note: passing argument to parameter here int sprintf(char * __restrict, const char * __restrict, ...) ^ ../../src/srl/srl_scan.c:611:15: warning: comparison of array 'sp->name' not equal to a null pointer is always true [-Wtautological-pointer-compare] if (sp->name != NULL) ~~~~^~~~ ~~~~ ../../src/srl/srl_scan.c:718:21: warning: passing 'unsigned char *' to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign] if ((sfp = fopen(fn, "r")) == NULL) { ^~ /usr/include/stdio.h:237:37: note: passing argument to parameter here FILE *fopen(const char * __restrict , const char * __restrict); ^ ../../src/srl/srl_scan.c:728:23: warning: passing 'unsigned char *' to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign] strcpy(scan_sfname,fn); /* Remember rule file's name */ ^~ /usr/include/string.h:58:56: note: passing argument to parameter here char *strcpy(char * __restrict, const char * __restrict); ^ ../../src/srl/srl_scan.c:1002:4: warning: non-void function does not return a value [-Wreturn-type] } ^ ../../src/srl/srl_scan.c:1043:35: warning: passing 'unsigned char *' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] v = nbrfromstr(10, v6ch, nbrx, x); ^~~~ ../../src/srl/srl_scan.c:1004:42: note: passing argument to parameter 'cp' here unsigned long nbrfromstr(int base, char *cp, int f1, int f2) ^ ../../src/srl/srl_scan.c:1047:35: warning: passing 'unsigned char *' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] v = nbrfromstr(16, v6ch, nbrx, x); ^~~~ ../../src/srl/srl_scan.c:1004:42: note: passing argument to parameter 'cp' here unsigned long nbrfromstr(int base, char *cp, int f1, int f2) ^ ../../src/srl/srl_scan.c:1066:35: warning: passing 'unsigned char *' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] v = nbrfromstr(16, v6ch, nbrx, x); ^~~~ ../../src/srl/srl_scan.c:1004:42: note: passing argument to parameter 'cp' here unsigned long nbrfromstr(int base, char *cp, int f1, int f2) ^ ../../src/srl/srl_scan.c:1082:35: warning: passing 'unsigned char *' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] v = nbrfromstr(10, v6ch, nbrx, x); ^~~~ ../../src/srl/srl_scan.c:1004:42: note: passing argument to parameter 'cp' here unsigned long nbrfromstr(int base, char *cp, int f1, int f2) ^ ../../src/srl/srl_scan.c:1156:11: warning: assigning to 'char *' from 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign] ibp = &v6ch[x]; ic = '0'; ^ ~~~~~~~~ ../../src/srl/srl_scan.c:1172:25: warning: passing 'char *' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign] if (get_v6address(a, ibp-1)) { ^~~~~ ../../src/srl/srl_scan.c:1018:57: note: passing argument to parameter 'v6ch' here int get_v6address(unsigned char *v6addr, unsigned char *v6ch) ^ ../../src/srl/srl_scan.c:1353:4: warning: non-void function does not return a value in all control paths [-Wreturn-type] } ^ ../../src/srl/srl_scan.c:1571:34: warning: sizeof on pointer operation will return size of 'char *' instead of 'char [10000]' [-Wsizeof-array-decay] len = sizeof(def_text-2); ~~~~~~~~^ 15 warnings generated. clang -I../../src/srl -I../.. -DNETBSD -DNETFLOW -DHAVE_CONFIG_H -c ../../src/srl/srl_emit.c ../../src/srl/srl_emit.c:230:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] static if_grp_ix; ~~~~~~ ^ ../../src/srl/srl_emit.c:414:25: warning: passing 'unsigned char [50]' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] if (!asmint) sprintf(b, "%d & ", n->d.operand.attrib); ^ /usr/include/stdio.h:275:31: note: passing argument to parameter here int sprintf(char * __restrict, const char * __restrict, ...) ^ ../../src/srl/srl_emit.c:415:17: warning: passing 'unsigned char [50]' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] else sprintf(b, "%s & ", attribs[attr_ix[n->d.operand.attrib]].name); ^ /usr/include/stdio.h:275:31: note: passing argument to parameter here int sprintf(char * __restrict, const char * __restrict, ...) ^ ../../src/srl/srl_emit.c:501:7: warning: implicit declaration of function 'check_mask' is invalid in C99 [-Wimplicit-function-declaration] check_mask(na[0]); ^ ../../src/srl/srl_emit.c:785:49: warning: data argument not used by format string [-Wformat-extra-args] "%d & 0 = &d", FTV1-1 + sp->d.arg.reg, sp->d.arg.attrib); ~~~~~~~~~~~~~ ^ ../../src/srl/srl_emit.c:947:7: warning: implicit declaration of function 'lookup' is invalid in C99 [-Wimplicit-function-declaration] lookup(attrib); ^ ../../src/srl/srl_emit.c:1138:16: warning: implicit declaration of function 'lookup' is invalid in C99 [-Wimplicit-function-declaration] lookup(tp->id); ^ ../../src/srl/srl_emit.c:1353:27: warning: format string is not a string literal (potentially insecure) [-Wformat-security] fprintf(code, &inbuf[1]); ^~~~~~~~~ ../../src/srl/srl_emit.c:1353:27: note: treat the string as an argument to avoid this fprintf(code, &inbuf[1]); ^ "%s", 8 warnings generated. clang -o srl srl.o srl_scan.o srl_emit.o -lresolv -lm cd src/manager; /usr/bin/make clang -O2 -I/usr/include -I../../src/manager -I../../src/snmplib -I../.. -DNETBSD -DNETFLOW -DHAVE_CONFIG_H -c ../../src/manager/nmc.c ../../src/manager/nmc.c:445:18: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (reachable = meter_info(ms)) { ~~~~~~~~~~^~~~~~~~~~~~~~~~ ../../src/manager/nmc.c:445:18: note: place parentheses around the assignment to silence this warning if (reachable = meter_info(ms)) { ^ ( ) ../../src/manager/nmc.c:445:18: note: use '==' to turn this assignment into an equality comparison if (reachable = meter_info(ms)) { ^ == ../../src/manager/nmc.c:484:10: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] first_t, ms->next_event, ms->next_keepalive, ms->next_sample); ^~~~~~~ ../../src/manager/nmc.c:484:19: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] first_t, ms->next_event, ms->next_keepalive, ms->next_sample); ^~~~~~~~~~~~~~ ../../src/manager/nmc.c:484:35: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] first_t, ms->next_event, ms->next_keepalive, ms->next_sample); ^~~~~~~~~~~~~~~~~~ ../../src/manager/nmc.c:484:55: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] first_t, ms->next_event, ms->next_keepalive, ms->next_sample); ^~~~~~~~~~~~~~~ ../../src/manager/nmc.c:823:23: warning: format string is not a string literal (potentially insecure) [-Wformat-security] fprintf(stderr, ver); ^~~ ../../src/manager/nmc.c:823:23: note: treat the string as an argument to avoid this fprintf(stderr, ver); ^ "%s", ../../src/manager/nmc.c:868:39: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (first_meter->trace_interval = def_trace_interval) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ ../../src/manager/nmc.c:868:39: note: place parentheses around the assignment to silence this warning if (first_meter->trace_interval = def_trace_interval) ^ ( ) ../../src/manager/nmc.c:868:39: note: use '==' to turn this assignment into an equality comparison if (first_meter->trace_interval = def_trace_interval) ^ == ../../src/manager/nmc.c:894:30: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (ms->trace_interval = def_trace_interval) ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ ../../src/manager/nmc.c:894:30: note: place parentheses around the assignment to silence this warning if (ms->trace_interval = def_trace_interval) ^ ( ) ../../src/manager/nmc.c:894:30: note: use '==' to turn this assignment into an equality comparison if (ms->trace_interval = def_trace_interval) ^ == ../../src/manager/nmc.c:899:7: warning: implicit declaration of function 'end_of_file' is invalid in C99 [-Wimplicit-function-declaration] if (end_of_file()) break; ^ ../../src/manager/nmc.c:901:11: warning: implicit declaration of function 'end_of_file' is invalid in C99 [-Wimplicit-function-declaration] if (end_of_file()) break; ^ ../../src/manager/nmc.c:1408:10: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] ms->next_event, ms->next_keepalive); ^~~~~~~~~~~~~~ ../../src/manager/nmc.c:1408:26: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] ms->next_event, ms->next_keepalive); ^~~~~~~~~~~~~~~~~~ ../../src/manager/nmc.c:1527:48: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] if (testing) fprintf(stderr, "Sample: t=%u",ms->next_event); ~~ ^~~~~~~~~~~~~~ %ld ../../src/manager/nmc.c:1551:28: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] ms->synchronised, ms->next_sample, ms->next_keepalive); ^~~~~~~~~~~~~~~ ../../src/manager/nmc.c:1551:45: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] ms->synchronised, ms->next_sample, ms->next_keepalive); ^~~~~~~~~~~~~~~~~~ 15 warnings generated. clang -O2 -I/usr/include -I../../src/manager -I../../src/snmplib -I../.. -DNETBSD -DNETFLOW -DHAVE_CONFIG_H -c ../../src/manager/nmc_pars.c ../../src/manager/nmc_pars.c:487:28: warning: format specifies type 'unsigned long' but the argument has type 'Bit32' (aka 'unsigned int') [-Wformat] sprintf(buf,"%lu %lu ", sfd->n_subflows, sfd->mx_active_subflows); ~~~ ^~~~~~~~~~~~~~~ %u ../../src/manager/nmc_pars.c:487:45: warning: format specifies type 'unsigned long' but the argument has type 'Bit32' (aka 'unsigned int') [-Wformat] sprintf(buf,"%lu %lu ", sfd->n_subflows, sfd->mx_active_subflows); ~~~ ^~~~~~~~~~~~~~~~~~~~~~~ %u ../../src/manager/nmc_pars.c:504:28: warning: format specifies type 'unsigned long' but the argument has type 'Bit32' (aka 'unsigned int') [-Wformat] sprintf(buf," %lu %lu", sfd->ToTCPDecrSeq, sfd->FromTCPDecrSeq); ~~~ ^~~~~~~~~~~~~~~~~ %u ../../src/manager/nmc_pars.c:504:47: warning: format specifies type 'unsigned long' but the argument has type 'Bit32' (aka 'unsigned int') [-Wformat] sprintf(buf," %lu %lu", sfd->ToTCPDecrSeq, sfd->FromTCPDecrSeq); ~~~ ^~~~~~~~~~~~~~~~~~~ %u ../../src/manager/nmc_pars.c:1023:4: warning: non-void function does not return a value [-Wreturn-type] } ^ ../../src/manager/nmc_pars.c:1375:52: warning: format string is not a string literal (potentially insecure) [-Wformat-security] if (b <= SZ_ATTRIBS) fprintf(stdout,attribs[b].name); ^~~~~~~~~~~~~~~ ../../src/manager/nmc_pars.c:1375:52: note: treat the string as an argument to avoid this if (b <= SZ_ATTRIBS) fprintf(stdout,attribs[b].name); ^ "%s", ../../src/manager/nmc_pars.c:1379:29: warning: format string is not a string literal (potentially insecure) [-Wformat-security] printf(ms->separator[a]); /* No trailing blank */ ^~~~~~~~~~~~~~~~ ../../src/manager/nmc_pars.c:1379:29: note: treat the string as an argument to avoid this printf(ms->separator[a]); /* No trailing blank */ ^ "%s", ../../src/manager/nmc_pars.c:1382:23: warning: format string is not a string literal (potentially insecure) [-Wformat-security] printf(ms->separator[a++]); ^~~~~~~~~~~~~~~~~~ ../../src/manager/nmc_pars.c:1382:23: note: treat the string as an argument to avoid this printf(ms->separator[a++]); ^ "%s", 8 warnings generated. clang -O2 -I/usr/include -I../../src/manager -I../../src/snmplib -I../.. -DNETBSD -DNETFLOW -DHAVE_CONFIG_H -c ../../src/manager/nmc_c64.c ../../src/manager/nmc_c64.c:66:23: warning: format specifies type 'unsigned long' but the argument has type 'counter64' (aka 'unsigned long long') [-Wformat] sprintf(bp, "%lu", *c); ~~~ ^~ %llu 1 warning generated. clang -O2 -I/usr/include -I../../src/manager -I../../src/snmplib -I../.. -DNETBSD -DNETFLOW -DHAVE_CONFIG_H -c ../../src/manager/nmc_snmp.c ../../src/manager/nmc_snmp.c:482:7: warning: implicit declaration of function 'sprint_objid' is invalid in C99 [-Wimplicit-function-declaration] sprint_objid(buf, vars->name, vars->name_length); ^ ../../src/manager/nmc_snmp.c:517:10: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if(mt = try_v2_meter(ms)) return mt; ~~~^~~~~~~~~~~~~~~~~~ ../../src/manager/nmc_snmp.c:517:10: note: place parentheses around the assignment to silence this warning if(mt = try_v2_meter(ms)) return mt; ^ ( ) ../../src/manager/nmc_snmp.c:517:10: note: use '==' to turn this assignment into an equality comparison if(mt = try_v2_meter(ms)) return mt; ^ == ../../src/manager/nmc_snmp.c:1674:4: warning: non-void function does not return a value [-Wreturn-type] } ^ ../../src/manager/nmc_snmp.c:2031:66: warning: format specifies type 'unsigned long' but the argument has type 'Bit32' (aka 'unsigned int') [-Wformat] fprintf(stderr, "column_info(ms,fb,a=%d,ft=%lu,fn=%d)\n",a,ft,*fn); ~~~ ^~ %u ../../src/manager/nmc_snmp.c:2230:48: warning: format specifies type 'unsigned long' but the argument has type 'oid' (aka 'unsigned int') [-Wformat] sprintf(ms->version,"%lu.%lu", meter_maj(ms),meter_min(ms)); ~~~ ~~~~~~~~~~^~~ %u ../../src/manager/nmc.h:838:24: note: expanded from macro 'meter_maj' #define meter_maj(ms) ms->versionid[8] /* Meter version number */ ^~~~~~~~~~~~~~~~ ../../src/manager/nmc_snmp.c:2230:62: warning: format specifies type 'unsigned long' but the argument has type 'oid' (aka 'unsigned int') [-Wformat] sprintf(ms->version,"%lu.%lu", meter_maj(ms),meter_min(ms)); ~~~ ~~~~~~~~~~^~~ %u ../../src/manager/nmc.h:839:24: note: expanded from macro 'meter_min' #define meter_min(ms) ms->versionid[9] ^~~~~~~~~~~~~~~~ 6 warnings generated. clang -o NeMaC nmc.o nmc_pars.o nmc_c64.o nmc_snmp.o ../../src/snmplib/libsnmp.a -lresolv -lm clang -O2 -I/usr/include -I../../src/manager -I../../src/snmplib -I../.. -DNETBSD -DNETFLOW -DHAVE_CONFIG_H -c ../../src/manager/nm_rc.c ../../src/manager/nm_rc.c:286:13: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] first_t, ms->next_event, ms->next_keepalive, ms->next_sample); ^~~~~~~ ../../src/manager/nm_rc.c:286:22: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] first_t, ms->next_event, ms->next_keepalive, ms->next_sample); ^~~~~~~~~~~~~~ ../../src/manager/nm_rc.c:286:38: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] first_t, ms->next_event, ms->next_keepalive, ms->next_sample); ^~~~~~~~~~~~~~~~~~ ../../src/manager/nm_rc.c:286:58: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] first_t, ms->next_event, ms->next_keepalive, ms->next_sample); ^~~~~~~~~~~~~~~ ../../src/manager/nm_rc.c:355:23: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (no_user_format = ms->format[0] == 0) { /* No format specified */ ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ ../../src/manager/nm_rc.c:355:23: note: place parentheses around the assignment to silence this warning if (no_user_format = ms->format[0] == 0) { /* No format specified */ ^ ( ) ../../src/manager/nm_rc.c:355:23: note: use '==' to turn this assignment into an equality comparison if (no_user_format = ms->format[0] == 0) { /* No format specified */ ^ == ../../src/manager/nm_rc.c:387:43: warning: format string is not a string literal (potentially insecure) [-Wformat-security] if (b <= SZ_ATTRIBS) fprintf(stdout,attribs[b].name); ^~~~~~~~~~~~~~~ ../../src/manager/nm_rc.c:387:43: note: treat the string as an argument to avoid this if (b <= SZ_ATTRIBS) fprintf(stdout,attribs[b].name); ^ "%s", ../../src/manager/nm_rc.c:391:29: warning: format string is not a string literal (potentially insecure) [-Wformat-security] fprintf(stdout, ms->separator[a]); ^~~~~~~~~~~~~~~~ ../../src/manager/nm_rc.c:391:29: note: treat the string as an argument to avoid this fprintf(stdout, ms->separator[a]); ^ "%s", ../../src/manager/nm_rc.c:394:22: warning: format string is not a string literal (potentially insecure) [-Wformat-security] fprintf(stdout,ms->separator[a++]); ^~~~~~~~~~~~~~~~~~ ../../src/manager/nm_rc.c:394:22: note: treat the string as an argument to avoid this fprintf(stdout,ms->separator[a++]); ^ "%s", ../../src/manager/nm_rc.c:635:36: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (first_meter->trace_interval = def_trace_interval) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ ../../src/manager/nm_rc.c:635:36: note: place parentheses around the assignment to silence this warning if (first_meter->trace_interval = def_trace_interval) ^ ( ) ../../src/manager/nm_rc.c:635:36: note: use '==' to turn this assignment into an equality comparison if (first_meter->trace_interval = def_trace_interval) ^ == ../../src/manager/nm_rc.c:905:35: warning: format string is not a string literal (potentially insecure) [-Wformat-security] *bp = '\0'; fprintf(stdout,buf); ^~~ ../../src/manager/nm_rc.c:905:35: note: treat the string as an argument to avoid this *bp = '\0'; fprintf(stdout,buf); ^ "%s", ../../src/manager/nm_rc.c:932:39: warning: format string is not a string literal (potentially insecure) [-Wformat-security] *fbp = '\0'; fprintf(stdout,fdfbuf); ^~~~~~ ../../src/manager/nm_rc.c:932:39: note: treat the string as an argument to avoid this *fbp = '\0'; fprintf(stdout,fdfbuf); ^ "%s", ../../src/manager/nm_rc.c:949:39: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] if (testing) printf("Sample: t=%u",ms->next_event); ~~ ^~~~~~~~~~~~~~ %ld ../../src/manager/nm_rc.c:957:25: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] ms->synchronised, ms->next_sample, ms->next_keepalive); ^~~~~~~~~~~~~~~ ../../src/manager/nm_rc.c:957:42: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] ms->synchronised, ms->next_sample, ms->next_keepalive); ^~~~~~~~~~~~~~~~~~ 14 warnings generated. clang -O2 -I/usr/include -I../../src/manager -I../../src/snmplib -I../.. -DNETBSD -DNETFLOW -DHAVE_CONFIG_H -c ../../src/manager/nm_display.c clang -o nm_rc nm_rc.o nm_display.o nmc_pars.o nmc_c64.o nmc_snmp.o ../../src/snmplib/libsnmp.a ../../src/snmplib/libsnmp.a -lresolv -lm clang -O2 -I/usr/include -I../../src/manager -I../../src/snmplib -I../.. -DNETBSD -DNETFLOW -DHAVE_CONFIG_H -c ../../src/manager/nm_st.c ../../src/manager/nm_st.c:204:13: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] first_t, ms->next_event, ms->next_keepalive, ms->next_sample); ^~~~~~~ ../../src/manager/nm_st.c:204:22: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] first_t, ms->next_event, ms->next_keepalive, ms->next_sample); ^~~~~~~~~~~~~~ ../../src/manager/nm_st.c:204:38: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] first_t, ms->next_event, ms->next_keepalive, ms->next_sample); ^~~~~~~~~~~~~~~~~~ ../../src/manager/nm_st.c:204:58: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] first_t, ms->next_event, ms->next_keepalive, ms->next_sample); ^~~~~~~~~~~~~~~ ../../src/manager/nm_st.c:227:4: warning: non-void function does not return a value in all control paths [-Wreturn-type] } ^ ../../src/manager/nm_st.c:322:4: warning: implicit declaration of function 'init_mib' is invalid in C99 [-Wimplicit-function-declaration] init_mib(); /* Initialise SNMP handler */ ^ ../../src/manager/nm_st.c:408:28: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] ts, ms->NbrFlows, ms->FlowsRecovered, ^~~~~~~~~~~~~~~~~~ ../../src/manager/nm_st.c:412:39: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] if (testing) printf("Sample: t=%u",ms->next_event); ~~ ^~~~~~~~~~~~~~ %ld ../../src/manager/nm_st.c:420:25: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] ms->synchronised, ms->next_sample, ms->next_keepalive); ^~~~~~~~~~~~~~~ ../../src/manager/nm_st.c:420:42: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] ms->synchronised, ms->next_sample, ms->next_keepalive); ^~~~~~~~~~~~~~~~~~ 10 warnings generated. clang -o nm_st nm_st.o nmc_c64.o nmc_pars.o nmc_snmp.o ../../src/snmplib/libsnmp.a -lresolv -lm clang -O2 -I/usr/include -I../../src/manager -I../../src/snmplib -I../.. -DNETBSD -DNETFLOW -DHAVE_CONFIG_H -c ../../src/manager/nm_rr.c ../../src/manager/nm_rr.c:208:13: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] first_t, ms->next_event, ms->next_keepalive, ms->next_sample); ^~~~~~~ ../../src/manager/nm_rr.c:208:22: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] first_t, ms->next_event, ms->next_keepalive, ms->next_sample); ^~~~~~~~~~~~~~ ../../src/manager/nm_rr.c:208:38: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] first_t, ms->next_event, ms->next_keepalive, ms->next_sample); ^~~~~~~~~~~~~~~~~~ ../../src/manager/nm_rr.c:208:58: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] first_t, ms->next_event, ms->next_keepalive, ms->next_sample); ^~~~~~~~~~~~~~~ ../../src/manager/nm_rr.c:231:4: warning: non-void function does not return a value in all control paths [-Wreturn-type] } ^ ../../src/manager/nm_rr.c:319:4: warning: implicit declaration of function 'init_mib' is invalid in C99 [-Wimplicit-function-declaration] init_mib(); /* Initialise SNMP handler */ ^ ../../src/manager/nm_rr.c:421:28: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] ts, ms->NbrFlows, ms->FlowsRecovered, ^~~~~~~~~~~~~~~~~~ ../../src/manager/nm_rr.c:425:39: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] if (testing) printf("Sample: t=%u",ms->next_event); ~~ ^~~~~~~~~~~~~~ %ld ../../src/manager/nm_rr.c:433:25: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] ms->synchronised, ms->next_sample, ms->next_keepalive); ^~~~~~~~~~~~~~~ ../../src/manager/nm_rr.c:433:42: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long') [-Wformat] ms->synchronised, ms->next_sample, ms->next_keepalive); ^~~~~~~~~~~~~~~~~~ 10 warnings generated. clang -o nm_rr nm_rr.o nmc_c64.o nmc_pars.o nmc_snmp.o ../../src/snmplib/libsnmp.a -lresolv -lm clang -O2 -I/usr/include -I../../src/manager -I../../src/snmplib -I../.. -DNETBSD -DNETFLOW -DHAVE_CONFIG_H -c ../../src/manager/fd_filter.c ../../src/manager/fd_filter.c:165:14: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (op = relop_next()) { ~~~^~~~~~~~~~~~~~ ../../src/manager/fd_filter.c:165:14: note: place parentheses around the assignment to silence this warning if (op = relop_next()) { ^ ( ) ../../src/manager/fd_filter.c:165:14: note: use '==' to turn this assignment into an equality comparison if (op = relop_next()) { ^ == ../../src/manager/fd_filter.c:178:14: warning: implicitly declaring library function 'isalpha' with type 'int (int)' [-Wimplicit-function-declaration] if (isalpha(ic)) break; ^ ../../src/manager/fd_filter.c:178:14: note: include the header or explicitly provide a declaration for 'isalpha' ../../src/manager/fd_filter.c:258:12: warning: implicit declaration of function 'check_formats' is invalid in C99 [-Wimplicit-function-declaration] if (!check_formats(&in_set, &out_set)) return 0; ^ ../../src/manager/fd_filter.c:449:14: warning: implicitly declaring library function 'isspace' with type 'int (int)' [-Wimplicit-function-declaration] for (--p; isspace(*p); ) --p; ^ ../../src/manager/fd_filter.c:449:14: note: include the header or explicitly provide a declaration for 'isspace' ../../src/manager/fd_filter.c:450:12: warning: implicitly declaring library function 'isdigit' with type 'int (int)' [-Wimplicit-function-declaration] for ( ; isdigit(*p); ) --p; ^ ../../src/manager/fd_filter.c:450:12: note: include the header or explicitly provide a declaration for 'isdigit' ../../src/manager/fd_filter.c:479:9: warning: implicit declaration of function 'check_formats' is invalid in C99 [-Wimplicit-function-declaration] if (!check_formats(&in_set, &out_set)) exit(1); ^ ../../src/manager/fd_filter.c:831:30: warning: '/*' within block comment [-Wcomment] /* fflush(stdout); /* !!!! */ ^ ../../src/manager/fd_filter.c:335:33: warning: array index 64 is past the end of the array (which contains 64 elements) [-Warray-bounds] format_fn[0] = input_fn[0] = trailer_fn[STR_LEN] = '\0'; ^ ~~~~~~~ ../../src/manager/fd_filter.c:205:1: note: array 'trailer_fn' declared here char trailer_fn[STR_LEN], handling_trailer; ^ 8 warnings generated. clang -O2 -I/usr/include -I../../src/manager -I../../src/snmplib -I../.. -DNETBSD -DNETFLOW -DHAVE_CONFIG_H -c ../../src/manager/fd_parse.c ../../src/manager/fd_parse.c:394:39: warning: operator '<<' has lower precedence than '-'; '-' will be evaluated first [-Wshift-op-parentheses] fs->distrib_bits |= 1 << n-DISTRIB_BASE; ~~ ~^~~~~~~~~~~~~ ../../src/manager/fd_parse.c:394:39: note: place parentheses around the '-' expression to silence this warning fs->distrib_bits |= 1 << n-DISTRIB_BASE; ~^~~~~~~~~~~~~ ../../src/manager/fd_parse.c:396:37: warning: operator '<<' has lower precedence than '-'; '-' will be evaluated first [-Wshift-op-parentheses] fs->delta_bits |= 1 << n-DELTA_BASE; ~~ ~^~~~~~~~~~~ ../../src/manager/fd_parse.c:396:37: note: place parentheses around the '-' expression to silence this warning fs->delta_bits |= 1 << n-DELTA_BASE; ~^~~~~~~~~~~ ../../src/manager/fd_parse.c:451:25: warning: format string is not a string literal (potentially insecure) [-Wformat-security] fprintf(stderr,attribs[x].name); ^~~~~~~~~~~~~~~ ../../src/manager/fd_parse.c:451:25: note: treat the string as an argument to avoid this fprintf(stderr,attribs[x].name); ^ "%s", ../../src/manager/fd_parse.c:454:29: warning: format string is not a string literal (potentially insecure) [-Wformat-security] fprintf(stderr, fs->separator[n]); ^~~~~~~~~~~~~~~~ ../../src/manager/fd_parse.c:454:29: note: treat the string as an argument to avoid this fprintf(stderr, fs->separator[n]); ^ "%s", 4 warnings generated. clang -o fd_filter fd_filter.o fd_parse.o nmc_c64.o clang -O2 -I/usr/include -I../../src/manager -I../../src/snmplib -I../.. -DNETBSD -DNETFLOW -DHAVE_CONFIG_H -c ../../src/manager/fd_extract.c clang -o fd_extract fd_extract.o fd_parse.o nmc_c64.o cd src/meter; /usr/bin/make clang -O2 -I/usr/include -I../../src/snmplib -I../../src/meter -I../../src/meter/tcpdump -I../.. -DNETRAMET -DNETBSD -DHAVE_CONFIG_H -c ../../src/meter/flowhash.c ../../src/meter/flowhash.c:40:35: warning: '/*' within block comment [-Wcomment] * Changes (mainly changing // to /* comments) for Irix ^ In file included from ../../src/meter/flowhash.c:164: ../../src/meter/flowhash.h:425:19: warning: '/*' within block comment [-Wcomment] /* send_win, /* Window advertised in this pkt */ ^ ../../src/meter/flowhash.h:426:24: warning: '/*' within block comment [-Wcomment] /* recv_win; /* Space in receiver window (from last ACK) */ ^ ../../src/meter/flowhash.c:468:27: warning: '/*' within block comment [-Wcomment] /* q->FlowRuleSet = 0; /* Now it doesn't look like part of an rs chain! */ ^ ../../src/meter/flowhash.c:755:7: warning: format specifies type 'unsigned int' but the argument has type 'Bit32' (aka 'unsigned long') [-Wformat] a >> 24, (a >> 16) & 0xFF, (a >> 8) & 0xFF, a & 0xFF); ^~~~~~~ ../../src/meter/flowhash.c:755:16: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] a >> 24, (a >> 16) & 0xFF, (a >> 8) & 0xFF, a & 0xFF); ^~~~~~~~~~~~~~~~ ../../src/meter/flowhash.c:755:34: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] a >> 24, (a >> 16) & 0xFF, (a >> 8) & 0xFF, a & 0xFF); ^~~~~~~~~~~~~~~ ../../src/meter/flowhash.c:755:51: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] a >> 24, (a >> 16) & 0xFF, (a >> 8) & 0xFF, a & 0xFF); ^~~~~~~~ ../../src/meter/flowhash.c:761:7: warning: format specifies type 'unsigned int' but the argument has type 'Bit32' (aka 'unsigned long') [-Wformat] a >> 24, (a >> 16) & 0xFF, (a >> 8) & 0xFF, a & 0xFF); ^~~~~~~ ../../src/meter/flowhash.c:761:16: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] a >> 24, (a >> 16) & 0xFF, (a >> 8) & 0xFF, a & 0xFF); ^~~~~~~~~~~~~~~~ ../../src/meter/flowhash.c:761:34: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] a >> 24, (a >> 16) & 0xFF, (a >> 8) & 0xFF, a & 0xFF); ^~~~~~~~~~~~~~~ ../../src/meter/flowhash.c:761:51: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] a >> 24, (a >> 16) & 0xFF, (a >> 8) & 0xFF, a & 0xFF); ^~~~~~~~ ../../src/meter/flowhash.c:772:7: warning: format specifies type 'unsigned int' but the argument has type 'Bit32' (aka 'unsigned long') [-Wformat] a >> 24, (a >> 16) & 0xFF, (a >> 8) & 0xFF, a & 0xFF); ^~~~~~~ ../../src/meter/flowhash.c:772:16: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] a >> 24, (a >> 16) & 0xFF, (a >> 8) & 0xFF, a & 0xFF); ^~~~~~~~~~~~~~~~ ../../src/meter/flowhash.c:772:34: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] a >> 24, (a >> 16) & 0xFF, (a >> 8) & 0xFF, a & 0xFF); ^~~~~~~~~~~~~~~ ../../src/meter/flowhash.c:772:51: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] a >> 24, (a >> 16) & 0xFF, (a >> 8) & 0xFF, a & 0xFF); ^~~~~~~~ ../../src/meter/flowhash.c:783:43: warning: format specifies type 'unsigned long' but the argument has type 'struct flow *' [-Wformat] fprintf(logfl,"%s: %lu %u\n {", msg,f, f->fk.PeerAddrType); ~~~ ^ ../../src/meter/flowhash.c:936:4: warning: non-void function does not return a value in all control paths [-Wreturn-type] } ^ ../../src/meter/flowhash.c:1188:10: warning: add explicit braces to avoid dangling else [-Wdangling-else] else --adj_reqd; ^ ../../src/meter/flowhash.c:2286:7: warning: format specifies type 'int' but the argument has type 'Bit32' (aka 'unsigned long') [-Wformat] fthashmod, inuse_slots, inuse_slots*100.0/fthashmod); ^~~~~~~~~ ../../src/meter/flowhash.c:2285:47: warning: invalid conversion specifier ')' [-Wformat-invalid-specifier] printf(" %d hash slots, %d in use (%.2f\%)\n", ~~^ ../../src/meter/flowhash.c:2412:45: warning: operator '<<' has lower precedence than '-'; '-' will be evaluated first [-Wshift-op-parentheses] f->distrib_bits |= 1 << d->selector-FTTOPACKETSIZE; ~~ ~~~~~~~~~~~^~~~~~~~~~~~~~~ ../../src/meter/flowhash.c:2412:45: note: place parentheses around the '-' expression to silence this warning f->distrib_bits |= 1 << d->selector-FTTOPACKETSIZE; ~~~~~~~~~~~^~~~~~~~~~~~~~~ ../../src/meter/flowhash.c:2805:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] static last_ntm_LastTime = 0; ~~~~~~ ^ ../../src/meter/flowhash.c:2844:22: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (keep = (inact < sto)) ++n_kept; ~~~~~^~~~~~~~~~~~~~~ ../../src/meter/flowhash.c:2844:22: note: place parentheses around the assignment to silence this warning if (keep = (inact < sto)) ++n_kept; ^ ( ) ../../src/meter/flowhash.c:2844:22: note: use '==' to turn this assignment into an equality comparison if (keep = (inact < sto)) ++n_kept; ^ == ../../src/meter/flowhash.c:3009:34: warning: '/*' within block comment [-Wcomment] /* #define MX_SEQ_DELTA 29200 /* 20 Ethernet TCP packets */ ^ ../../src/meter/flowhash.c:3185:4: warning: non-void function does not return a value [-Wreturn-type] } ^ ../../src/meter/flowhash.c:3525:10: warning: format specifies type 'int' but the argument has type 'Bit32' (aka 'unsigned long') [-Wformat] sfhashmod, inuse_slots, inuse_slots*100.0/sfhashmod); ^~~~~~~~~ ../../src/meter/flowhash.c:3524:50: warning: invalid conversion specifier ')' [-Wformat-invalid-specifier] printf(" %d hash slots, %d in use (%.2f\%)\n", ~~^ ../../src/meter/flowhash.c:4802:26: warning: '/*' within block comment [-Wcomment] /* case PT_6ICMP: /* ICMPv6 */ ^ ../../src/meter/flowhash.c:4914:19: warning: & has lower precedence than !=; != will be evaluated first [-Wparentheses] if (hdrp[6] & 0x1F != 0 || hdrp[7] != 0) { /* Fragment offset != 0 */ ^~~~~~~~~~~ ../../src/meter/flowhash.c:4914:19: note: place parentheses around the '!=' expression to silence this warning if (hdrp[6] & 0x1F != 0 || hdrp[7] != 0) { /* Fragment offset != 0 */ ^ ( ) ../../src/meter/flowhash.c:4914:19: note: place parentheses around the & expression to evaluate it first if (hdrp[6] & 0x1F != 0 || hdrp[7] != 0) { /* Fragment offset != 0 */ ^ ( ) ../../src/meter/flowhash.c:5224:30: warning: format specifies type 'unsigned int' but the argument has type 'Bit32' (aka 'unsigned long') [-Wformat] sprintf(buf, "[%u B]", n); ~~ ^ %lu ../../src/meter/flowhash.c:5226:31: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] sprintf(buf, "[%u KB]", (n+512)/1024); ~~ ^~~~~~~~~~~~ %lu ../../src/meter/flowhash.c:5228:31: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] sprintf(buf, "[%u MB]", (n+512*1024)/(1024*1024)); ~~ ^~~~~~~~~~~~~~~~~~~~~~~~ %lu ../../src/meter/flowhash.c:5261:16: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] mxflows, sizeof(struct flow), u_fmt(nb,f)); ^~~~~~~~~~~~~~~~~~~ ../../src/meter/flowhash.c:5271:40: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] mxstr_blocks, n_free_str_blocks, sizeof(struct stream_data), u_fmt(nb,sd)); ^~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/meter/flowhash.c:5274:36: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] mxdistribs, n_free_distribs, sizeof(struct distribution), u_fmt(nb,d)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/meter/flowhash.c:5280:35: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] mxpktdatas, n_free_pktdata, sizeof(struct pktdata), u_fmt(nb,p)); ^~~~~~~~~~~~~~~~~~~~~~ ../../src/meter/flowhash.c:5328:29: warning: format specifies type 'int' but the argument has type 'Bit32' (aka 'unsigned long') [-Wformat] sprintf(msg, "%d tests", rsc_n_searches); ~~ ^~~~~~~~~~~~~~ %lu ../../src/meter/flowhash.c:5373:23: warning: format specifies type 'unsigned int' but the argument has type 'Bit32' (aka 'unsigned long') [-Wformat] active_flows(), nflows); ^~~~~~ ../../src/meter/flowhash.c:5456:46: warning: format specifies type 'unsigned long' but the argument has type 'double' [-Wformat] sprintf(msg,"Av pkt/s %lu, max pkt/s %u", aps,max_pkt_rate); ~~~ ^~~ %f ../../src/meter/flowhash.c:5456:50: warning: format specifies type 'unsigned int' but the argument has type 'Bit32' (aka 'unsigned long') [-Wformat] sprintf(msg,"Av pkt/s %lu, max pkt/s %u", aps,max_pkt_rate); ~~ ^~~~~~~~~~~~ %lu ../../src/meter/flowhash.c:5472:49: warning: format specifies type 'unsigned int' but the argument has type 'Bit32' (aka 'unsigned long') [-Wformat] sprintf(msg,"%u hash slots, %u in use, ", fthashmod,n_hash_ents); ~~ ^~~~~~~~~ %lu 42 warnings generated. clang -O2 -I/usr/include -I../../src/snmplib -I../../src/meter -I../../src/meter/tcpdump -I../.. -DNETRAMET -DNETBSD -DHAVE_CONFIG_H -c ../../src/meter/met_vars.c In file included from ../../src/meter/met_vars.c:155: ../../src/meter/flowhash.h:425:19: warning: '/*' within block comment [-Wcomment] /* send_win, /* Window advertised in this pkt */ ^ ../../src/meter/flowhash.h:426:24: warning: '/*' within block comment [-Wcomment] /* recv_win; /* Space in receiver window (from last ACK) */ ^ ../../src/meter/met_vars.c:595:17: warning: implicit declaration of function 'stop_meter' is invalid in C99 [-Wimplicit-function-declaration] if (die > 0) stop_meter(die); ^ ../../src/meter/met_vars.c:821:7: warning: implicit declaration of function 'pkt_counts' is invalid in C99 [-Wimplicit-function-declaration] pkt_counts(0); ^ ../../src/meter/met_vars.c:1369:34: warning: '/*' within block comment [-Wcomment] /* build_rdr_chains('L'); /* For nifty testing */ ^ ../../src/meter/met_vars.c:1620:39: warning: operator '<<' has lower precedence than '-'; '-' will be evaluated first [-Wshift-op-parentheses] if ((f->distrib_bits & (1 << attrib-FTTOPACKETSIZE)) == 0) { ~~ ~~~~~~^~~~~~~~~~~~~~~ ../../src/meter/met_vars.c:1620:39: note: place parentheses around the '-' expression to silence this warning if ((f->distrib_bits & (1 << attrib-FTTOPACKETSIZE)) == 0) { ~~~~~~^~~~~~~~~~~~~~~ 6 warnings generated. clang -O2 -I/usr/include -I../../src/snmplib -I../../src/meter -I../../src/meter/tcpdump -I../.. -DNETRAMET -DNETBSD -DHAVE_CONFIG_H -c ../../src/meter/meter_ux.c ../../src/meter/meter_ux.c:35:35: warning: '/*' within block comment [-Wcomment] * Changes (mainly changing // to /* comments) for Irix ^ In file included from ../../src/meter/meter_ux.c:169: ../../src/meter/flowhash.h:425:19: warning: '/*' within block comment [-Wcomment] /* send_win, /* Window advertised in this pkt */ ^ ../../src/meter/flowhash.h:426:24: warning: '/*' within block comment [-Wcomment] /* recv_win; /* Space in receiver window (from last ACK) */ ^ ../../src/meter/meter_ux.c:2157:7: warning: add explicit braces to avoid dangling else [-Wdangling-else] else strcpy(pi->name,interface); ^ ../../src/meter/meter_ux.c:2663:4: warning: implicit declaration of function 'init_snmp' is invalid in C99 [-Wimplicit-function-declaration] init_snmp(); ^ ../../src/meter/meter_ux.c:2683:4: warning: implicit declaration of function 'receive' is invalid in C99 [-Wimplicit-function-declaration] receive(sd,n_interfaces); ^ ../../src/meter/meter_ux.c:2859:12: warning: implicitly declaring library function 'tolower' with type 'int (int)' [-Wimplicit-function-declaration] switch (tolower(ch)) { ^ ../../src/meter/meter_ux.c:2859:12: note: include the header or explicitly provide a declaration for 'tolower' ../../src/meter/meter_ux.c:3181:33: warning: passing 'int *' to parameter of type '__socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] (struct sockaddr *)&from, &fromlength); ^~~~~~~~~~~ /usr/include/sys/socket.h:633:58: note: passing argument to parameter here struct sockaddr * __restrict, socklen_t * __restrict); ^ 8 warnings generated. clang -o NeTraMet meter_ux.o flowhash.o met_vars.o -L../../src/snmplib -lsnmp -L../../src/bgp -lbgp -lresolv -lm -Wl,-R/usr/lib -lpcap /usr/bin/ld: meter_ux.o: in function `interface_read': meter_ux.c:(.text+0xa31): undefined reference to `pcap_read' /usr/bin/ld: meter_ux.o: in function `receive': meter_ux.c:(.text+0x1a58): undefined reference to `pcap_read' clang: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Stop. make[1]: stopped in /data/scratch/security/netramet/work/NeTraMet44/src/meter *** Error code 1 Stop. make: stopped in /data/scratch/security/netramet/work/NeTraMet44 *** Error code 1 Stop. make[1]: stopped in /data/pkgsrc/security/netramet *** Error code 1 Stop. make: stopped in /data/pkgsrc/security/netramet