Skip to contentSkip to conversation

ima: Fix fall-through warning for Clang

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Jun 7, 2021 – Jun 8, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ima: Fix fall-through warning for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix a fall-through warning by explicitly adding a break statement instead of just letting the code fall through to the next case.

---
JFYI: We had thousands of these sorts of warnings and now we are down
to just 13 in linux-next(20210607). This is one of those last remaining warnings. :)

 security/integrity/ima/ima_template_lib.c | 1 +
 1 file changed, 1 insertion(+)
security/integrity/ima/ima_template_lib.c +1 -0
index 518fd50ea48a..8f96247b4a5c 100644
@@ -119,6 +119,7 @@ static void ima_show_template_data_ascii(struct seq_file *m,
 		default:
 			break;
 		}
+		break;
 	default:
 		break;
 	}
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Gustavo A. R. Silva

In preparation to enable -Wimplicit-fallthrough for Clang, fix a fall-through warning by explicitly adding a break statement instead of just letting the code fall through to the next case.

---
JFYI: We had thousands of these sorts of warnings and now we are down
to just 13 in linux-next(20210607). This is one of those last remaining warnings. :)

Looks right to me; thanks!

Quoted 19 lines
 security/integrity/ima/ima_template_lib.c | 1 +
 1 file changed, 1 insertion(+)
security/integrity/ima/ima_template_lib.c +1 -0
index 518fd50ea48a..8f96247b4a5c 100644
@@ -119,6 +119,7 @@ static void ima_show_template_data_ascii(struct seq_file *m,
 		default:
 			break;
 		}
+		break;
 	default:
 		break;
 	}
Signature · 1 line
2.27.0
Signature · 1 line
Kees Cook