rsocket / rsocket-cpp

C++ implementation of RSocket
http://rsocket.io
Apache License 2.0
253 stars 99 forks source link

Fix MarbleProcessor's fall through switch cases #891

Closed phoad closed 5 years ago

phoad commented 5 years ago

The build of RSocket fails in this Ubuntu 18.04 Docker environment. The reason is the fall through switch statements.

/home/rsocket-cpp/rsocket/tck-test/MarbleProcessor.cpp:95:33: warning: this statement may fall through [-Wimplicit-fallthrough=]
         subscriber.onError(std::runtime_error("Marble Error"));
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/rsocket-cpp/rsocket/tck-test/MarbleProcessor.cpp:96:7: note: here
       case '|':
       ^~~~
/home/rsocket-cpp/rsocket/tck-test/MarbleProcessor.cpp:98:30: warning: this statement may fall through [-Wimplicit-fallthrough=]
         subscriber.onComplete();
         ~~~~~~~~~~~~~~~~~~~~~^~
/home/rsocket-cpp/rsocket/tck-test/MarbleProcessor.cpp:99:7: note: here
       default: {

As long as the marble_ has more items and more messages are expected from the subscriber, it will continue publishing to the subscriber.

facebook-github-bot commented 5 years ago

@phoad merged this pull request in rsocket/rsocket-cpp@ba4ebab46208bd3f9f714207281afb4c9108d2a0.