Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix more mostly benign Linux/GCC compiler warnings (#827)
In file included from src/send-internal.h:23, from src/send.c:31: src/send-linux.h:25:27: warning: ‘sockaddr’ defined but not used [-Wunused-variable] 25 | static struct sockaddr_ll sockaddr; | ^~~~~~~~ src/send.c: In function ‘send_run’: src/send.c:457:30: warning: ‘attempts’ may be used uninitialized [-Wmaybe-uninitialized] 457 | if (!zconf.dryrun && send_batch(st, batch, attempts) < 0) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/send.c:303:13: note: ‘attempts’ was declared here 303 | int attempts = zconf.retries + 1; | ^~~~~~~~ src/probe_modules/module_dns.c: In function ‘dns_global_initialize’: src/probe_modules/module_dns.c:637:25: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 637 | strncpy(domain_ptr, domain_token, domain_len); | ^ src/probe_modules/module_dns.c:634:43: note: length computed here 634 | uint domain_len = strlen(domain_token); | ^~~~~~~~~~~~~~~~~~~~
- Loading branch information