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

libbpf-tools: enforce missing-field-initializers warning and error on… #4975

Merged
merged 1 commit into from
Apr 30, 2024

Commits on Apr 30, 2024

  1. libbpf-tools: enforce missing-field-initializers warning and error on…

    … warnings
    
    In an internal build where `missing-field-initializers` would be enforce,
    libbpf-tools would fail to build with an error similar to:
    ```
    tcptop.c:75:9: error: missing initializer for field 'group' of 'const struct argp_option' [-Werror=missing-field-initializers]
       75 |         { "nosummary", 'S', NULL, 0, "Skip system summary line"},
          |         ^
    In file included from tcptop.c:10:
    /usr/include/argp.h:73:7: note: 'group' declared here
       73 |   int group;
          |       ^~~~~
    ```
    
    This change tacks the default group value of 0 to all `struct argp_option` used
    in libbpf-tools.
    
    At the same time, I am taking the opportunity to promote warnings to error
    in order to prevent regressions from making it in.
    
    Signed-off-by: Manu Bretelle <[email protected]>
    chantra committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    78eac58 View commit details
    Browse the repository at this point in the history