linux-bl808/scripts/gcc-plugins
Kees Cook 8d97fb393c gcc-plugins/stackleak: Avoid assignment for unused macro argument
With GCC version >= 8, the cgraph_create_edge() macro argument using
"frequency" goes unused. Instead of assigning a temporary variable for
the argument, pass the compute_call_stmt_bb_frequency() call directly
as the macro argument so that it will just not be called when it is
not wanted by the macros.

Silences the warning:

scripts/gcc-plugins/stackleak_plugin.c:54:6: warning: variable ‘frequency’ set but not used [-Wunused-but-set-variable]

Now builds cleanly with gcc-7 and gcc-9. Both boot and pass
STACKLEAK_ERASING LKDTM test.

Signed-off-by: Kees Cook <keescook@chromium.org>
2020-04-13 10:17:44 -07:00
..
.gitignore
arm_ssp_per_task_plugin.c
cyc_complexity_plugin.c
gcc-common.h
gcc-generate-gimple-pass.h
gcc-generate-ipa-pass.h
gcc-generate-rtl-pass.h
gcc-generate-simple_ipa-pass.h
gen-random-seed.sh
Kconfig gcc-plugins: drop support for GCC <= 4.7 2020-04-09 00:13:45 +09:00
latent_entropy_plugin.c
Makefile gcc-plugins: drop support for GCC <= 4.7 2020-04-09 00:13:45 +09:00
randomize_layout_plugin.c
sancov_plugin.c
stackleak_plugin.c gcc-plugins/stackleak: Avoid assignment for unused macro argument 2020-04-13 10:17:44 -07:00
structleak_plugin.c