Fix -Wswitch-default

Fix and enforce absence of such issues.
This commit is contained in:
Reto Schneider 2023-03-24 18:43:31 +01:00
parent b03310d5fa
commit 6d268c804a
2 changed files with 4 additions and 0 deletions

View File

@ -831,6 +831,9 @@ static void prv_display_objects(lwm2m_context_t *lwm2mH, char *buffer, void *use
case TEST_OBJECT_ID:
display_test_object(object);
break;
default:
fprintf(stdout, "unknown object ID: %" PRIu16 "\n", object->objID);
break;
}
}
}

View File

@ -130,6 +130,7 @@ add_compile_options(
-Werror=incompatible-pointer-types
-Werror=shadow
-Werror=strict-prototypes
-Werror=switch-default
)
# The maximum buffer size that is provided for resource responses and must be respected due to the limited IP buffer.