Skip to content

Commit 8e897c4

Browse files
miguelafsilva5danielRep
authored andcommitted
ref(fallthrough): Change the fallthrough annotation to attribute
Clang compiler only accepts fallthrough annotation to be done using attribute(fallthrough). This is can be enforced in gcc using the flag -Wimplicit-fallthrough=5 Signed-off-by: Miguel Silva <[email protected]>
1 parent c859fe5 commit 8e897c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/printk.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ size_t vsnprintk(char* buf, size_t buf_size, const char** fmt, va_list* args)
123123
case 'x':
124124
case 'X':
125125
flags = flags | F_BASE16;
126-
/* fallthrough */
126+
__attribute__((fallthrough));
127127
case 'u':
128128
flags = flags | F_UNSIGNED;
129-
/* fallthrough */
129+
__attribute__((fallthrough));
130130
case 'd':
131131
case 'i':
132132
va_copy(args_tmp, *args);

0 commit comments

Comments
 (0)