From a7141c518a94b42923712de0d83a3e45fe1ee3ca Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Wed, 24 Feb 2016 18:49:25 -0600 Subject: [PATCH] lib/memrange: avoid shadow object declarations Fix an error where a variable named 'free' was shadowing the function 'free'. src/lib/memrange.c:293:73: error: declaration of 'free' shadows a global declaration [-Werror=shadow] Change-Id: Ie57194b392f8f00ed4fd5c76dab27299b00ae293 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/13788 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh Reviewed-by: Paul Menzel --- src/lib/memrange.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/memrange.c b/src/lib/memrange.c index cc75e01c26..489b56212a 100644 --- a/src/lib/memrange.c +++ b/src/lib/memrange.c @@ -290,7 +290,7 @@ void memranges_add_resources(struct memranges *ranges, memranges_add_resources_filter(ranges, mask, match, tag, NULL); } -void memranges_init_empty(struct memranges *ranges, struct range_entry *free, +void memranges_init_empty(struct memranges *ranges, struct range_entry *to_free, size_t num_free) { size_t i; @@ -299,7 +299,7 @@ void memranges_init_empty(struct memranges *ranges, struct range_entry *free, ranges->free_list = NULL; for (i = 0; i < num_free; i++) - range_entry_link(&ranges->free_list, &free[i]); + range_entry_link(&ranges->free_list, &to_free[i]); } void memranges_init(struct memranges *ranges,