8000 Compiler warnings · Issue #343 · Links2004/arduinoWebSockets · GitHub
[go: up one dir, main page]

Skip to content
Compiler warnings #343
Closed
Closed
@starlino

Description

@starlino

My compiler is issuing following warnings. Compiler warnings in libraries distract from warnings in user code .

I think it is common practice now to define a
default: break ;
line in the switch statements.

.piolibdeps\WebSockets_ID549\src\WebSocketsServer.cpp: In member function 'virtual void WebSocketsServer::messageReceived(WSclient_t*, WSopcode_t, uint8_t*, size_t, bool)':
.piolibdeps\WebSockets_ID549\src\WebSocketsServer.cpp:483:11: warning: enumeration value 'WSop_close' not handled in switch [-Wswitch]
switch(opcode) {
^
.piolibdeps\WebSockets_ID549\src\WebSocketsServer.cpp:483:11: warning: enumeration value 'WSop_ping' not handled in switch [-Wswitch]
.piolibdeps\WebSockets_ID549\src\WebSocketsServer.cpp:483:11: warning: enumeration value 'WSop_pong' not handled in switch [-Wswitch]

Additionally there is an unused variable:

.piolibdeps\WebSockets_ID549\src\WebSockets.cpp: In member function 'void WebSockets::handleWebsocketPayloadCb(WSclient_t*, bool, uint8_t*)':
.piolibdeps\WebSockets_ID549\src\WebSockets.cpp:443:26: warning: variable 'reasonCode' set but not used [-Wunused-but-set-variable]
uint16_t reasonCode = 1000;

Thank you !!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0