Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix more mostly benign Linux/GCC compiler warnings #827

Merged
merged 1 commit into from Mar 15, 2024

Commits on Mar 15, 2024

  1. Fix more mostly benign Linux/GCC compiler warnings

    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);
          |                                           ^~~~~~~~~~~~~~~~~~~~
    droe committed Mar 15, 2024
    Copy the full SHA
    d1751b2 View commit details
    Browse the repository at this point in the history