summaryrefslogtreecommitdiffstats
path: root/src/arch/x86/tables.c
diff options
context:
space:
mode:
authorRichard Spiegel <richard.spiegel@amd.corp-partner.google.com>2018-08-08 09:58:34 -0700
committerMartin Roth <martinroth@google.com>2018-08-09 16:06:06 +0000
commitbb7424f30c3b7b8938326f75123b39c0ba4c4027 (patch)
treeafa8061fcee528f227f29cb87bae1e2b9f3564d3 /src/arch/x86/tables.c
parent43bd594af9db261e1afe32da8f6a65f0df4976a9 (diff)
downloadcoreboot-bb7424f30c3b7b8938326f75123b39c0ba4c4027.tar.gz
coreboot-bb7424f30c3b7b8938326f75123b39c0ba4c4027.tar.bz2
coreboot-bb7424f30c3b7b8938326f75123b39c0ba4c4027.zip
arch/x86/tables.c: Avoid static analysis error for unused value
Within procedure arch_write_tables, the pointer "rom_table_end" is updated every time a table is created. However, after creating last table, pointer rom_table_end is not used, though it is updated. Add a "(void)rom_table_end;" at the end to avoid the static analysis error. BUG=b:112253891 TEST=Build and boot grunt. Change-Id: I8a34026795c7f0d1bb86c5f5c0469d40aa53994a Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com> Reviewed-on: https://review.coreboot.org/27958 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/arch/x86/tables.c')
-rw-r--r--src/arch/x86/tables.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/arch/x86/tables.c b/src/arch/x86/tables.c
index 0a9a3d59b480..0bab4234c951 100644
--- a/src/arch/x86/tables.c
+++ b/src/arch/x86/tables.c
@@ -259,6 +259,9 @@ void arch_write_tables(uintptr_t coreboot_table)
forwarding_table += sz;
/* Align up to page boundary for historical consistency. */
forwarding_table = ALIGN_UP(forwarding_table, 4*KiB);
+
+ /* Tell static analysis we know value is left unused. */
+ (void)rom_table_end;
}
void bootmem_arch_add_ranges(void)