summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@aliftype.com>2023-02-03 17:58:12 +0200
committerKhaled Hosny <khaled@aliftype.com>2023-02-06 11:39:08 +0200
commitc6a27dc28b2fac589322eb18d448e1eca335d8c6 (patch)
tree6491f856a1c387fd2060c68fdbcff952a3e2a332
parentb588a43fcd608d6ace9a84097ab5cf99e9ad3b38 (diff)
downloadcairo-c6a27dc28b2fac589322eb18d448e1eca335d8c6.tar.gz
Fix -Wuninitialized
../perf/cairo-perf-chart.c:232:4: warning: variable 'sum' is uninitialized when used here [-Wuninitialized] sum += v/100; ^~~ ../perf/cairo-perf-chart.c:142:43: note: initialize the variable 'sum' to silence this warning double slow_sum = 0, fast_sum = 0, sum; ^ = 0.0
-rw-r--r--perf/cairo-perf-chart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/perf/cairo-perf-chart.c b/perf/cairo-perf-chart.c
index 738fe5c7b..9ccb9b42e 100644
--- a/perf/cairo-perf-chart.c
+++ b/perf/cairo-perf-chart.c
@@ -139,7 +139,7 @@ find_ranges (struct chart *chart)
double test_time;
int seen_non_null;
int num_tests = 0;
- double slow_sum = 0, fast_sum = 0, sum;
+ double slow_sum = 0, fast_sum = 0, sum = 0;
int slow_count = 0, fast_count = 0;
int *count;
int i;