On Mon, Apr 24, 2017 at 6:21 PM, Joel Sherrill <j...@rtems.org> wrote:
> Module:    rtems
> Branch:    master
> Commit:    906e67fe88658122d515a5dcc0570ee56a02877d
> Changeset: 
> http://git.rtems.org/rtems/commit/?id=906e67fe88658122d515a5dcc0570ee56a02877d
>
> Author:    Joel Sherrill <j...@rtems.org>
> Date:      Sun Apr 23 11:50:46 2017 -0500
>
> dhrystone/dhry_1.c: Fix may be used uninitialized warning
>
> ---
>
>  testsuites/benchmarks/dhrystone/dhry_1.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/testsuites/benchmarks/dhrystone/dhry_1.c 
> b/testsuites/benchmarks/dhrystone/dhry_1.c
> index 36ac303..9b64d3a 100644
> --- a/testsuites/benchmarks/dhrystone/dhry_1.c
> +++ b/testsuites/benchmarks/dhrystone/dhry_1.c
> @@ -143,6 +143,11 @@ execution_start:
>    Begin_Time = time ( (long *) 0);
>  #endif
>
> +#ifdef __rtems__
> +  /* avoid used uninitialized warning */
> +  Int_2_Loc = 0;
> +#endif
> +
This looks like unnecessarily catering to the compiler. At any rate,
this kind of change should be located before the call to the timer,
since it maybe perturbs the benchmark timing.

>    for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index)
>    {
>
>
> _______________________________________________
> vc mailing list
> v...@rtems.org
> http://lists.rtems.org/mailman/listinfo/vc
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to