robertdavidgraham / masscan

TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes.
GNU Affero General Public License v3.0
23.26k stars 3.04k forks source link

Linux build warnings on Ubuntu 13.10 #52

Closed dmaynor closed 10 years ago

dmaynor commented 10 years ago

Output of build on 13.10 with gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1 make gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/crypto-base64.c -o tmp/crypto-base64.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/event-timeout.c -o tmp/event-timeout.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/in-binary.c -o tmp/in-binary.o src/in-binary.c: In function ‘parse_file’: src/in-binary.c:242:13: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ [-Wformat=] fprintf(stderr, "%s: %8llu\r", filename, total_records); ^ gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/logger.c -o tmp/logger.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/main.c -o tmp/main.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/main-conf.c -o tmp/main-conf.o src/main-conf.c: In function ‘masscan_echo’: src/main-conf.c:184:5: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=] fprintf(fp, "seed = %llu\n", masscan->seed); ^ src/main-conf.c: In function ‘masscan_save_state’: src/main-conf.c:329:5: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=] fprintf(fp, "resume-index = %llu\n", masscan->resume.index); ^ gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/main-dedup.c -o tmp/main-dedup.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/main-initadapter.c -o tmp/main-initadapter.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/main-listscan.c -o tmp/main-listscan.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/main-ptrace.c -o tmp/main-ptrace.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/main-src.c -o tmp/main-src.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/main-status.c -o tmp/main-status.o src/main-status.c: In function ‘status_print’: src/main-status.c:140:25: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 7 has type ‘uint64_t’ [-Wformat=] ); ^ src/main-status.c:149:24: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘uint64_t’ [-Wformat=] ); ^ src/main-status.c:149:24: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘uint64_t’ [-Wformat=] src/main-status.c:159:24: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 8 has type ‘uint64_t’ [-Wformat=] ); ^ gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/main-throttle.c -o tmp/main-throttle.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/masscan-app.c -o tmp/masscan-app.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/out-binary.c -o tmp/out-binary.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/out-null.c -o tmp/out-null.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/output.c -o tmp/output.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/out-redis.c -o tmp/out-redis.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/out-text.c -o tmp/out-text.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/out-xml.c -o tmp/out-xml.o src/out-xml.c: In function ‘xml_out_close’: src/out-xml.c:58:13: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘uint64_t’ [-Wformat=] ); ^ src/out-xml.c:58:13: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 7 has type ‘uint64_t’ [-Wformat=] src/out-xml.c:58:13: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 8 has type ‘uint64_t’ [-Wformat=] gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/pixie-backtrace.c -o tmp/pixie-backtrace.o src/pixie-backtrace.c: In function ‘pixie_backtrace_init’: src/pixie-backtrace.c:70:13: warning: ignoring return value of ‘readlink’, declared with attribute warn_unused_result [-Wunused-result] readlink("/proc/self/exe", global_self, sizeof(global_self)); ^ src/pixie-backtrace.c: In function ‘handle_segfault’: src/pixie-backtrace.c:43:19: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result] system(foo); ^ gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/pixie-file.c -o tmp/pixie-file.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/pixie-threads.c -o tmp/pixie-threads.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/pixie-timer.c -o tmp/pixie-timer.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/proto-arp.c -o tmp/proto-arp.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/proto-banner1.c -o tmp/proto-banner1.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/proto-banout.c -o tmp/proto-banout.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/proto-dns.c -o tmp/proto-dns.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/proto-http.c -o tmp/proto-http.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/proto-icmp.c -o tmp/proto-icmp.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/proto-netbios.c -o tmp/proto-netbios.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/proto-preprocess.c -o tmp/proto-preprocess.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/proto-snmp.c -o tmp/proto-snmp.o src/proto-snmp.c: In function ‘snmp_banner_oid’: src/proto-snmp.c:248:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ [-Wformat=] sprintf_s(foo, sizeof(foo), ".%llu", x); ^ src/proto-snmp.c:248:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ [-Wformat=] src/proto-snmp.c: In function ‘handle_snmp’: src/proto-snmp.c:563:8: warning: ‘request_id’ may be used uninitialized in this function [-Wmaybe-uninitialized] if ((seqno&0x7FFFffff) != request_id) ^ src/proto-snmp.c: In function ‘snmp_selftest’: src/proto-snmp.c:643:8: warning: ‘request_id’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (request_id != 0x26) ^ src/proto-snmp.c:635:14: note: ‘request_id’ was declared here unsigned request_id; ^ gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/proto-ssh.c -o tmp/proto-ssh.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/proto-ssl.c -o tmp/proto-ssl.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/proto-ssl-test.c -o tmp/proto-ssl-test.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/proto-tcp.c -o tmp/proto-tcp.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/proto-udp.c -o tmp/proto-udp.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/proto-x509.c -o tmp/proto-x509.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/proto-zeroaccess.c -o tmp/proto-zeroaccess.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/rand-blackrock.c -o tmp/rand-blackrock.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/rand-lcg.c -o tmp/rand-lcg.o src/rand-lcg.c: In function ‘lcg_calculate_constants’: src/rand-lcg.c:320:13: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ [-Wformat=] printf("%llu ", factors[i]); ^ src/rand-lcg.c:322:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ [-Wformat=] printf("m = %-24llu (0x%llx)\n", m, m); ^ src/rand-lcg.c:322:9: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=] src/rand-lcg.c:323:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ [-Wformat=] printf("a = %-24llu (0x%llx)\n", a, a); ^ src/rand-lcg.c:323:9: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=] src/rand-lcg.c:324:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ [-Wformat=] printf("c = %-24llu (0x%llx)\n", c, c); ^ src/rand-lcg.c:324:9: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=] src/rand-lcg.c:325:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ [-Wformat=] printf("c%%m = %-24llu (0x%llx)\n", c%m, c%m); ^ src/rand-lcg.c:325:9: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=] src/rand-lcg.c:326:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ [-Wformat=] printf("a%%m = %-24llu (0x%llx)\n", a%m, a%m); ^ src/rand-lcg.c:326:9: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=] src/rand-lcg.c:349:17: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=] count += printf("%*llu ", digits, x); ^ gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/rand-primegen.c -o tmp/rand-primegen.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/ranges.c -o tmp/ranges.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/rawsock-arp.c -o tmp/rawsock-arp.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/rawsock.c -o tmp/rawsock.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/rawsock-getif.c -o tmp/rawsock-getif.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/rawsock-getip.c -o tmp/rawsock-getip.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/rawsock-getmac.c -o tmp/rawsock-getmac.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/rawsock-getroute.c -o tmp/rawsock-getroute.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/rawsock-pcapfile.c -o tmp/rawsock-pcapfile.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/rawsock-pfring.c -o tmp/rawsock-pfring.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/rte-ring.c -o tmp/rte-ring.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/siphash24.c -o tmp/siphash24.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/smack1.c -o tmp/smack1.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/smackqueue.c -o tmp/smackqueue.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/string_s.c -o tmp/string_s.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/syn-cookie.c -o tmp/syn-cookie.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/templ-payloads.c -o tmp/templ-payloads.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/templ-pkt.c -o tmp/templ-pkt.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -c src/xring.c -o tmp/xring.o gcc -g -ggdb -fno-omit-frame-pointer -rdynamic -I. -Wall -O3 -Wno-format -o bin/masscan tmp/crypto-base64.o tmp/event-timeout.o tmp/in-binary.o tmp/logger.o tmp/main.o tmp/main-conf.o tmp/main-dedup.o tmp/main-initadapter.o tmp/main-listscan.o tmp/main-ptrace.o tmp/main-src.o tmp/main-status.o tmp/main-throttle.o tmp/masscan-app.o tmp/out-binary.o tmp/out-null.o tmp/output.o tmp/out-redis.o tmp/out-text.o tmp/out-xml.o tmp/pixie-backtrace.o tmp/pixie-file.o tmp/pixie-threads.o tmp/pixie-timer.o tmp/proto-arp.o tmp/proto-banner1.o tmp/proto-banout.o tmp/proto-dns.o tmp/proto-http.o tmp/proto-icmp.o tmp/proto-netbios.o tmp/proto-preprocess.o tmp/proto-snmp.o tmp/proto-ssh.o tmp/proto-ssl.o tmp/proto-ssl-test.o tmp/proto-tcp.o tmp/proto-udp.o tmp/proto-x509.o tmp/proto-zeroaccess.o tmp/rand-blackrock.o tmp/rand-lcg.o tmp/rand-primegen.o tmp/ranges.o tmp/rawsock-arp.o tmp/rawsock.o tmp/rawsock-getif.o tmp/rawsock-getip.o tmp/rawsock-getmac.o tmp/rawsock-getroute.o tmp/rawsock-pcapfile.o tmp/rawsock-pfring.o tmp/rte-ring.o tmp/siphash24.o tmp/smack1.o tmp/smackqueue.o tmp/string_s.o tmp/syn-cookie.o tmp/templ-payloads.o tmp/templ-pkt.o tmp/xring.o -lpcap -lm -lrt -ldl -lpthread

robertdavidgraham commented 10 years ago

Fixed