Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libsepol: silence -Wextra-semi-stmt warning
On Ubuntu 20.04, when building with clang -Werror -Wextra-semi-stmt (which is not the default build configuration), the compiler reports: ../cil/src/cil_binary.c:4293:22: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt] mix(k->target_class); ^ ../cil/src/cil_binary.c:4294:21: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt] mix(k->target_type); ^ ../cil/src/cil_binary.c:4295:21: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt] mix(k->source_type); ^ ../cil/src/cil_binary.c:4296:19: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt] mix(k->specified); ^ Use a do { ... } while (0) construction to silence this warning. Moreover the same warning appears when using two semicolons to end a statement. Remove such occurrences, like what was already done in commit 8111856 ("libsepol: drop repeated semicolons"). Signed-off-by: Nicolas Iooss <[email protected]>
- Loading branch information