nickdesaulniers / node-nanomsg

Node.js binding for nanomsg
MIT License
402 stars 70 forks source link

fallthrough warnings in nanomsg #215

Closed nickdesaulniers closed 5 years ago

nickdesaulniers commented 5 years ago

probably because my system is using a newer compiler, but npm i I'm seeing:

In file included from ../deps/nanomsg/src/transports/ipc/sipc.c:26:0:
../deps/nanomsg/src/transports/ipc/sipc.c: In function ‘nn_sipc_handler’:
../deps/nanomsg/src/transports/ipc/../../utils/err.h:48:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (nn_slow (!(x))) {\
            ^
../deps/nanomsg/src/transports/ipc/sipc.c:377:21: note: in expansion of macro ‘nn_assert’
                     nn_assert (0);
                     ^~~~~~~~~
../deps/nanomsg/src/transports/ipc/sipc.c:380:13: note: here
             case NN_USOCK_SHUTDOWN:
             ^~~~

In file included from ../deps/nanomsg/src/transports/utils/streamhdr.c:28:0:
../deps/nanomsg/src/transports/utils/streamhdr.c: In function ‘nn_streamhdr_handler’:
../deps/nanomsg/src/transports/utils/../../utils/err.h:48:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (nn_slow (!(x))) {\
            ^
../deps/nanomsg/src/transports/utils/streamhdr.c:239:17: note: in expansion of macro ‘nn_assert’
                 nn_assert (0);
                 ^~~~~~~~~
../deps/nanomsg/src/transports/utils/streamhdr.c:242:9: note: here
         case NN_STREAMHDR_SRC_TIMER:
         ^~~~

I suspect this has already been reported and fixed upstream, in which case we need to up-rev our dependency. If it's not reported/fixed upstream, should be straightforward to do so.

nickdesaulniers commented 5 years ago

or we could disable them in https://github.com/nickdesaulniers/node-nanomsg/blob/master/deps/linux.gypi. Probably should reaudit those flags.