diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/assert.h | 11 | ||||
-rw-r--r-- | src/security/vboot/misc.h | 4 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/include/assert.h b/src/include/assert.h index 492629dd30..7252ab61e2 100644 --- a/src/include/assert.h +++ b/src/include/assert.h @@ -52,15 +52,10 @@ * The error message when this hits will look like this: * * ramstage/lib/bootmode.o: In function `display_init_required': - * bootmode.c:42: undefined reference to `dead_code_assertion_failed_at_line_42' + * bootmode.c:42: undefined reference to `_dead_code_assertion_failed' */ -#define __dead_code(tag, line) do { \ - extern void dead_code_assertion_failed##tag##_at_line_##line(void) \ - __attribute__((noreturn)); \ - dead_code_assertion_failed##tag##_at_line_##line(); \ -} while (0) -#define _dead_code(tag, line) __dead_code(tag, line) -#define dead_code(tag) _dead_code(tag, __LINE__) +extern void _dead_code_assertion_failed(void) __attribute__((noreturn)); +#define dead_code() _dead_code_assertion_failed() /* This can be used in the context of an expression of type 'type'. */ #define dead_code_t(type) ({ \ diff --git a/src/security/vboot/misc.h b/src/security/vboot/misc.h index 22cc75052c..fd422b2ff7 100644 --- a/src/security/vboot/misc.h +++ b/src/security/vboot/misc.h @@ -53,7 +53,7 @@ static inline int verification_should_run(void) else if (CONFIG(VBOOT_STARTS_IN_BOOTBLOCK)) return ENV_BOOTBLOCK; else - dead_code(_in_vboot_misc_h); + dead_code(); } static inline int verstage_should_load(void) @@ -82,7 +82,7 @@ static inline int vboot_logic_executed(void) /* Post-RAM stages are "after the romstage" */ return !ENV_ROMSTAGE_OR_BEFORE; } else { - dead_code(_in_vboot_misc_h); + dead_code(); } } |