[igt-dev] [PATCH i-g-t 3/4] gem_exec_latency: Initialize variance to zero
Chris Wilson
chris at chris-wilson.co.uk
Wed Mar 13 12:33:48 UTC 2019
Quoting Petri Latvala (2019-03-13 12:06:40)
> It's just added to in a loop later without any initialization or
> direct assignment.
>
> Signed-off-by: Petri Latvala <petri.latvala at intel.com>
> ---
> tests/i915/gem_exec_latency.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/i915/gem_exec_latency.c b/tests/i915/gem_exec_latency.c
> index 6dd191ec..1b022df5 100644
> --- a/tests/i915/gem_exec_latency.c
> +++ b/tests/i915/gem_exec_latency.c
> @@ -597,7 +597,7 @@ rthog_latency_on_ring(int fd, unsigned int engine, const char *name, unsigned in
> for (unsigned int child = 0; child < nengine; child++) {
> struct rt_pkt normal = results[NPASS * child + 1];
> igt_stats_t stats;
> - double variance;
> + double variance = 0.0;
Just = 0; would do.
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
More information about the igt-dev
mailing list