[PATCH 5/5] clang-format: Squash empty loops into a single line
Florian Bezdeka <[email protected]>
| Newsgroups | dev.linux.lists.xenomai |
|---|---|
| Message-ID | <[email protected]> |
while (cond) { vs while (cond) {}
}
The alternative
while (cond)
continue;
triggered a warning inside the analyzer:
Redundant control flow jump statement.
Signed-off-by: Florian Bezdeka <[email protected]>
---
.clang-format | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.clang-format b/.clang-format
index 2ffd69afc1a8280654a8763e044e27e08be7a69f..2792bc6a0b6f8d6eba81e2dbf7d0c6ba745707ca 100755
--- a/.clang-format
+++ b/.clang-format
@@ -17,7 +17,7 @@ AlignConsecutiveDeclarations: false
AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
-AllowShortBlocksOnASingleLine: false
+AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
--
2.54.0