selinux/libsepol/tests
Nicolas Iooss 9d85aa60d1 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
811185648a ("libsepol: drop repeated semicolons").

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2021-07-06 11:08:11 -04:00
..
policies Fix many misspellings 2019-09-18 22:47:35 +02:00
.gitignore Update .gitignore files 2016-05-09 08:14:54 -04:00
debug.c
debug.h
helpers.c libsepol/tests: fix -Wwrite-strings warnings 2017-02-06 11:06:04 -05:00
helpers.h libsepol, libsemanage: add a macro to silence static analyzer warnings in tests 2019-09-30 08:43:41 -04:00
libsepol-tests.c libsepol: silence -Wextra-semi-stmt warning 2021-07-06 11:08:11 -04:00
Makefile libsepol/tests: drop ncurses dependency 2020-05-04 10:31:44 +02:00
test-common.c libsepol, libsemanage: add a macro to silence static analyzer warnings in tests 2019-09-30 08:43:41 -04:00
test-common.h libsepol/tests: fix -Wwrite-strings warnings 2017-02-06 11:06:04 -05:00
test-cond.c
test-cond.h
test-deps.c libsepol, libsemanage: add a macro to silence static analyzer warnings in tests 2019-09-30 08:43:41 -04:00
test-deps.h
test-downgrade.c Fix many misspellings 2019-09-18 22:47:35 +02:00
test-downgrade.h Fix many misspellings 2019-09-18 22:47:35 +02:00
test-expander-attr-map.c libsepol, libsemanage: add a macro to silence static analyzer warnings in tests 2019-09-30 08:43:41 -04:00
test-expander-attr-map.h
test-expander-roles.c libsepol, libsemanage: add a macro to silence static analyzer warnings in tests 2019-09-30 08:43:41 -04:00
test-expander-roles.h
test-expander-users.c libsepol, libsemanage: add a macro to silence static analyzer warnings in tests 2019-09-30 08:43:41 -04:00
test-expander-users.h
test-expander.c libsepol/tests: fix -Wwrite-strings warnings 2017-02-06 11:06:04 -05:00
test-expander.h
test-linker-cond-map.c Fix many misspellings 2019-09-18 22:47:35 +02:00
test-linker-cond-map.h
test-linker-roles.c libsepol: add ebitmap_for_each_set_bit macro 2019-05-20 14:00:32 -04:00
test-linker-roles.h
test-linker-types.c libsepol/tests: fix -Wwrite-strings warnings 2017-02-06 11:06:04 -05:00
test-linker-types.h
test-linker.c
test-linker.h