fix: add missing braces to switch case (#90)

This resolves a build error on macOS/clang 17, due to declaring a
variable immediately after a case label in the switch, we need to wrap
the case in braces.
This commit is contained in:
Cameron Clough 2024-11-02 16:17:26 +00:00 committed by GitHub
parent 861a6560fe
commit be1b46eb9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -298,6 +298,7 @@ void handle_generic_packet(int skt, GenericPacket *request)
case SERVICE_ID_SYSTEM:
switch (gen_cmd->method_id) {
case METHOD_ID_SYSTEM_GET_INFO:
{
SystemInfo *info = (SystemInfo *)&response.payload[0];
info->board_ver = htonl(BOARD_VERSION_MASS);
info->chip_ver = htonl(CHIP_VERSION_ES3);
@ -310,6 +311,7 @@ void handle_generic_packet(int skt, GenericPacket *request)
response.generic_cmd_header.error_code = 0;
break;
}
}
break;
case SERVICE_ID_PERIPHERAL:
switch (gen_cmd->method_id) {