Nico Huber (nico.huber@secunet.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3295
-gerrit
commit 7532acf597009c44c15de15f5b5c3fdca3e05cef Author: Nico Huber nico.huber@secunet.com Date: Sun May 26 14:06:41 2013 +0200
Fix a warning in elfload.c
Fix the warning:
main/elfload.c: In function 'load_segments': main/elfload.c:138:21: warning: variable 'time' set but not used [-Wunused-but-set-variable]
by setting 'time' (and 'start_time') only when DEBUG is enabled.
Change-Id: I19975963f180f7380dcae8d07f088505203fdbc9 Signed-off-by: Nico Huber nico.huber@secunet.com --- main/elfload.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/main/elfload.c b/main/elfload.c index 63ea2b4..3eb03c2 100644 --- a/main/elfload.c +++ b/main/elfload.c @@ -135,11 +135,12 @@ static int load_segments(Elf_phdr *phdr, int phnum, unsigned long checksum_offset) { unsigned long bytes; - u64 start_time, time; int i;
bytes = 0; - start_time = currticks(); +#if defined(DEBUG) && (DEBUG == 1) + u64 start_time = currticks(); +#endif for (i = 0; i < phnum; i++) { if (phdr[i].p_type != PT_LOAD) continue; @@ -165,9 +166,11 @@ static int load_segments(Elf_phdr *phdr, int phnum, debug("ok\n");
} - time = currticks() - start_time; +#if defined(DEBUG) && (DEBUG == 1) + u64 time = currticks() - start_time; debug("Loaded %lu bytes in %ums (%luKB/s)\n", bytes, time, time? bytes/time : 0); +#endif return 1; }