[warnings] fix a few warnings introduced with newer version of gcc
Most of the warnings are new, such as needing to mark fallthroughs on cases explicitly. A few are based on signed vs unsigned comparisons. Disable one warning that was annoying about comparing null to arguments marked nonnull.
This commit is contained in:
@@ -112,6 +112,7 @@ static int lkb_send(lkb_t *lkb, u8 opcode, const void *data, size_t len) {
|
||||
break;
|
||||
}
|
||||
len = 0;
|
||||
// fallthrough
|
||||
default:
|
||||
lkb->state = STATE_ERROR;
|
||||
opcode = MSG_FAIL;
|
||||
|
||||
@@ -251,6 +251,7 @@ void handle(u32 magic, u32 cmd, u32 arg) {
|
||||
return;
|
||||
case 'A':
|
||||
boot_app();
|
||||
/* fallthrough */
|
||||
case 'R':
|
||||
/* reboot "normally" */
|
||||
reply[1] = 0;
|
||||
|
||||
@@ -69,7 +69,7 @@ static const union double_int float_test_vec[] = {
|
||||
};
|
||||
|
||||
#define countof(a) (sizeof(a) / sizeof((a)[0]))
|
||||
static const unsigned int float_test_vec_size = countof(float_test_vec);
|
||||
__attribute__((unused)) static const unsigned int float_test_vec_size = countof(float_test_vec);
|
||||
|
||||
#define PRINT_FLOAT \
|
||||
printf("0x%016llx %f %F %a %A\n", \
|
||||
|
||||
Reference in New Issue
Block a user