github / glb-director

GitHub Load Balancer Director and supporting tooling.
Other
2.38k stars 229 forks source link

ignoring implicit fallthrough on 4.20.11/ubuntu 18.04.2 #73

Open openhacker opened 5 years ago

openhacker commented 5 years ago

builds generate a warning which shuts down....

There's a -Wimplicit-fallthrough flag in kernel builds.

This gets around the problem

diff --git a/src/glb-director/shared_opt.c b/src/glb-director/shared_opt.c index 46e9307..0c93355 100644 --- a/src/glb-director/shared_opt.c +++ b/src/glb-director/shared_opt.c @@ -48,6 +48,8 @@ void get_options(char config_file, char forwarding_table, int argc, {"debug", no_argument, NULL, 'v'}, {NULL, 0, NULL, 0}};

+#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" + while ((opt = getopt_long(argc, argv, ":c:t:v", long_options, NULL)) != -1) switch (opt) { diff --git a/src/glb-director/siphash24.c b/src/glb-director/siphash24.c index ebe785c..e3cda35 100644 --- a/src/glb-director/siphash24.c +++ b/src/glb-director/siphash24.c @@ -110,7 +110,7 @@ int siphash(uint8_t out, const uint8_t in, uint64_t inlen, const uint8_t *k)

            v0 ^= m;                                                                                                                                                
    }                                                                                                                                                               
theojulienne commented 5 years ago

Thanks for reporting this! Would you mind creating a PR against this repo for the change? That'll make sure you're correctly attributed as the author of the change 😀

openhacker commented 5 years ago

Should I fork a copy and then send the pull request?

marty

On Tue, Jul 30, 2019 at 6:16 PM Theo Julienne notifications@github.com wrote:

Thanks for reporting this! Would you mind creating a PR against this repo for the change? That'll make sure you're correctly attributed as the author of the change 😀

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/github/glb-director/issues/73?email_source=notifications&email_token=AASBRKOIV3IF44VIIONEURDQCC4TDA5CNFSM4IHM775KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3FPEQY#issuecomment-516616771, or mute the thread https://github.com/notifications/unsubscribe-auth/AASBRKK3ILHFQAQ7PA36K5TQCC4TDANCNFSM4IHM775A .

theojulienne commented 5 years ago

Should I fork a copy and then send the pull request?

Yep, that would be perfect!

openhacker commented 5 years ago

done, I found all types of other issues I fixed which prevented me from compiling....(logged issues for everything)

On Sun, Aug 4, 2019 at 4:11 AM Theo Julienne notifications@github.com wrote:

Should I fork a copy and then send the pull request?

Yep, that would be perfect!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/github/glb-director/issues/73?email_source=notifications&email_token=AASBRKJLBDKZIPVPF7BFQETQC2FMRA5CNFSM4IHM775KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3P4YVA#issuecomment-517983316, or mute the thread https://github.com/notifications/unsubscribe-auth/AASBRKKSFAB2QZ6M4QQIZTTQC2FMRANCNFSM4IHM775A .

ravisinghsfbay commented 5 years ago

Filed PR https://github.com/github/glb-director/pull/84 which should address this issue using a slightly different approach.