kernel: Add missing break/default in switch statement

Explicitly add default clause and break instruction in every clauses in
switch statement.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2018-09-10 22:54:55 -07:00 committed by Anas Nashif
commit a3cea50ce7
2 changed files with 7 additions and 0 deletions

View file

@ -68,6 +68,7 @@ static inline int is_condition_met(struct k_poll_event *event, u32_t *state)
return 0;
default:
__ASSERT(0, "invalid event type (0x%x)\n", event->type);
break;
}
return 0;
@ -119,6 +120,7 @@ static inline int register_event(struct k_poll_event *event,
break;
default:
__ASSERT(0, "invalid event type\n");
break;
}
event->poller = poller;
@ -149,6 +151,7 @@ static inline void clear_event_registration(struct k_poll_event *event)
break;
default:
__ASSERT(0, "invalid event type\n");
break;
}
}

View file

@ -462,6 +462,10 @@ void _dump_object_error(int retval, void *obj, struct _k_object *ko,
break;
case -EADDRINUSE:
printk("%p %s in use\n", obj, otype_to_str(otype));
break;
default:
/* Not handled error */
break;
}
}