summaryrefslogtreecommitdiff
path: root/src/benchmarks
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-11-06 17:26:43 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-11-09 11:43:59 +0000
commit98042f98ebee7b11176a53544d901b4f4405a59c (patch)
tree11abe3bd92541861d0aa8b821b2bc3cc651669f3 /src/benchmarks
parente15c663c0a348700aa80c45eb86b636ad19298ff (diff)
eina bench array - fix warning about if case not guarding
fix warning noise... no change in code function though.
Diffstat (limited to 'src/benchmarks')
-rw-r--r--src/benchmarks/eina/eina_bench_array.c38
1 files changed, 21 insertions, 17 deletions
diff --git a/src/benchmarks/eina/eina_bench_array.c b/src/benchmarks/eina/eina_bench_array.c
index 5b974d1..dc04eaf 100644
--- a/src/benchmarks/eina/eina_bench_array.c
+++ b/src/benchmarks/eina/eina_bench_array.c
@@ -88,13 +88,13 @@ eina_bench_array_4evas_render_inline(int request)
88 88
89 if (i == 500) 89 if (i == 500)
90 { 90 {
91 EINA_ARRAY_ITER_NEXT(array, j, ebo, it) 91 EINA_ARRAY_ITER_NEXT(array, j, ebo, it) free(ebo);
92 free(ebo);
93
94 eina_array_clean(array); 92 eina_array_clean(array);
95 } 93 }
96 else if (i % 30 == 0) 94 else if ((i % 30) == 0)
97 eina_array_remove(array, keep, NULL); 95 {
96 eina_array_remove(array, keep, NULL);
97 }
98 98
99 EINA_ARRAY_ITER_NEXT(array, j, ebo, it) 99 EINA_ARRAY_ITER_NEXT(array, j, ebo, it)
100 ebo->keep = rand() < (RAND_MAX / 2) ? ebo->keep : EINA_FALSE; 100 ebo->keep = rand() < (RAND_MAX / 2) ? ebo->keep : EINA_FALSE;
@@ -160,8 +160,10 @@ eina_bench_array_4evas_render_iterator(int request)
160 160
161 eina_array_clean(array); 161 eina_array_clean(array);
162 } 162 }
163 else if (i % 30 == 0) 163 else if ((i % 30) == 0)
164 eina_array_remove(array, keep, NULL); 164 {
165 eina_array_remove(array, keep, NULL);
166 }
165 167
166 it = eina_array_iterator_new(array); 168 it = eina_array_iterator_new(array);
167 eina_iterator_foreach(it, EINA_EACH_CB(eina_iterator_ebo_rand), NULL); 169 eina_iterator_foreach(it, EINA_EACH_CB(eina_iterator_ebo_rand), NULL);
@@ -207,7 +209,7 @@ eina_bench_list_4evas_render(int request)
207 free(eina_list_data_get(list)); 209 free(eina_list_data_get(list));
208 list = eina_list_remove_list(list, list); 210 list = eina_list_remove_list(list, list);
209 } 211 }
210 else if (i % 30 == 0) 212 else if ((i % 30) == 0)
211 { 213 {
212 tmp = list; 214 tmp = list;
213 while (tmp) 215 while (tmp)
@@ -273,7 +275,7 @@ eina_bench_list_4evas_render_iterator(int request)
273 free(eina_list_data_get(list)); 275 free(eina_list_data_get(list));
274 list = eina_list_remove_list(list, list); 276 list = eina_list_remove_list(list, list);
275 } 277 }
276 else if (i % 30 == 0) 278 else if ((i % 30) == 0)
277 { 279 {
278 tmp = list; 280 tmp = list;
279 while (tmp) 281 while (tmp)
@@ -334,7 +336,7 @@ eina_bench_inlist_4evas_render(int request)
334 head = head->next; 336 head = head->next;
335 free(tmp); 337 free(tmp);
336 } 338 }
337 else if (i % 30 == 0) 339 else if ((i % 30) == 0)
338 { 340 {
339 tmp = head; 341 tmp = head;
340 while(tmp) 342 while(tmp)
@@ -392,7 +394,7 @@ eina_bench_inlist_4evas_render_iterator(int request)
392 head = head->next; 394 head = head->next;
393 free(tmp); 395 free(tmp);
394 } 396 }
395 else if (i % 30 == 0) 397 else if ((i % 30) == 0)
396 { 398 {
397 tmp = head; 399 tmp = head;
398 while(tmp) 400 while(tmp)
@@ -450,7 +452,7 @@ eina_bench_glist_4evas_render(int request)
450 free(list->data); 452 free(list->data);
451 list = g_list_delete_link(list, list); 453 list = g_list_delete_link(list, list);
452 } 454 }
453 else if (i % 30 == 0) 455 else if ((i % 30) == 0)
454 { 456 {
455 tmp = list; 457 tmp = list;
456 while (tmp) 458 while (tmp)
@@ -512,7 +514,7 @@ eina_bench_gptrarray_4evas_render(int request)
512 free(g_ptr_array_index(array, j)); 514 free(g_ptr_array_index(array, j));
513 g_ptr_array_remove_range(array, 0, array->len); 515 g_ptr_array_remove_range(array, 0, array->len);
514 } 516 }
515 else if (i % 30 == 0) 517 else if ((i % 30) == 0)
516 for (j = 0; j < array->len; ) 518 for (j = 0; j < array->len; )
517 { 519 {
518 ebo = g_ptr_array_index(array, j); 520 ebo = g_ptr_array_index(array, j);
@@ -565,7 +567,7 @@ eina_bench_evas_list_4evas_render(int request)
565 free(evas_list_data(list)); 567 free(evas_list_data(list));
566 list = evas_list_remove_list(list, list); 568 list = evas_list_remove_list(list, list);
567 } 569 }
568 else if (i % 30 == 0) 570 else if ((i % 30) == 0)
569 { 571 {
570 tmp = list; 572 tmp = list;
571 while (tmp) 573 while (tmp)
@@ -642,10 +644,12 @@ eina_bench_ecore_list_4evas_render(int request)
642 644
643 if (i == 500) 645 if (i == 500)
644 ecore_list_clear(list); 646 ecore_list_clear(list);
645 else if (i % 30 == 0) 647 else if ((i % 30) == 0)
646 ecore_list_for_each(list, _eina_ecore_for_each_remove, list); 648 {
649 ecore_list_for_each(list, _eina_ecore_for_each_remove, list);
650 }
647 651
648 ecore_list_for_each(list, _eina_ecore_for_each_rand, list); 652 ecore_list_for_each(list, _eina_ecore_for_each_rand, list);
649 } 653 }
650 654
651 ecore_list_destroy(list); 655 ecore_list_destroy(list);