eembc / coremark

CoreMark® is an industry-standard benchmark that measures the performance of central processing units (CPU) and embedded microcrontrollers (MCU).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building with `-Wall and -Wextra` creates warnings

Jo5ta opened this issue · comments

commented

Building with -Wall and -Wextra creates the following warnings:

cc -O2 -Imacos -Iposix -I. -DFLAGS_STR=\""-O2   "\" -DITERATIONS=0 -Wall -Wextra  core_list_join.c core_main.c core_matrix.c core_state.c core_util.c posix/core_portme.c -o ./coremark.exe 
posix/core_portme.c:209:38: warning: unused parameter 'argc' [-Wunused-parameter]
portable_init(core_portable *p, int *argc, char *argv[])
                                     ^
posix/core_portme.c:209:50: warning: unused parameter 'argv' [-Wunused-parameter]
portable_init(core_portable *p, int *argc, char *argv[])
                                                 ^
lib/coremark/core_list_join.c: In function 'core_bench_list':
lib/coremark/core_list_join.c:445:60: warning: 'info.data16' may be used uninitialized in this function [-Wmaybe-uninitialized]
  445 |         while (list && ((list->info->data16 & 0xff) != info->data16))
      |                                                        ~~~~^~~~~~~~
lib/coremark/core_list_join.c:167:16: note: 'info.data16' was declared here
  167 |     list_data  info;
      |                ^~~~
4 warnings generated.

Tested with: riscv64-unknown-elf-gcc (GCC) 11.1.0

Thanks for the PR. Always good to clean up warnings.