summaryrefslogtreecommitdiff log msg author committer range
diff options
 context: 12345678910152025303540 space: includeignore mode: unifiedssdiffstat only
author committer Jaehyun Cho 2019-09-09 14:46:01 +0900 Jaehyun Cho 2019-09-09 14:47:10 +0900 b6d5ee9745cc3a71dc8529f8028aa8cfcd8e6c2a (patch) a72c871ac81ce58470e9364bdd74bc999af733f6 1ecaf6fa025137771ac05ca97b4f78c0b281d3d5 (diff)
elm perf_test: fix warning of implicit conversion of floating point
The result of integral division is converted into floating point. To fix the warning by assigning the result to Evas_Coord variable, type cast is done.
-rw-r--r--src/bin/elementary/perf_test_01.c4
-rw-r--r--src/bin/elementary/perf_test_02.c4
-rw-r--r--src/bin/elementary/perf_test_03.c4
3 files changed, 6 insertions, 6 deletions
 diff --git a/src/bin/elementary/perf_test_01.c b/src/bin/elementary/perf_test_01.cindex adb849fb80..d29f84813b 100644--- a/src/bin/elementary/perf_test_01.c+++ b/src/bin/elementary/perf_test_01.c @@ -36,9 +36,9 @@ TST(01, tick) (Evas *e EINA_UNUSED, double f, Evas_Coord win_w, Evas_Coord win_h 36 w = 5 + ((1.0 + cos((double)((f * 30.0) + (i * 10)))) * w0 * 2); 36 w = 5 + ((1.0 + cos((double)((f * 30.0) + (i * 10)))) * w0 * 2); 37 h = 5 + ((1.0 + sin((double)((f * 40.0) + (i * 19)))) * h0 * 2); 37 h = 5 + ((1.0 + sin((double)((f * 40.0) + (i * 19)))) * h0 * 2); 38 x = (win_w / 2) - (w / 2); 38 x = (win_w / 2) - (w / 2); 39 x += sin((double)((f * 50.0) + (i * 13))) * (w0 / 2); 39 x += (Evas_Coord)(sin((double)((f * 50.0) + (i * 13))) * (w0 / 2)); 40 y = (win_h / 2) - (h / 2); 40 y = (win_h / 2) - (h / 2); 41 y += cos((double)((f * 45.0) + (i * 28))) * (h0 / 2); 41 y += (Evas_Coord)(cos((double)((f * 45.0) + (i * 28))) * (h0 / 2)); 42 evas_object_geometry_set(o, x, y, w, h); 42 evas_object_geometry_set(o, x, y, w, h); 43 } 43 } 44 } 44 } diff --git a/src/bin/elementary/perf_test_02.c b/src/bin/elementary/perf_test_02.cindex 2683cd116d..ac381c732a 100644--- a/src/bin/elementary/perf_test_02.c+++ b/src/bin/elementary/perf_test_02.c @@ -36,9 +36,9 @@ TST(02, tick) (Evas *e EINA_UNUSED, double f, Evas_Coord win_w, Evas_Coord win_h 36 w = 5 + ((1.0 + cos((double)((f * 30.0) + (i * 10)))) * w0 * 2); 36 w = 5 + ((1.0 + cos((double)((f * 30.0) + (i * 10)))) * w0 * 2); 37 h = 5 + ((1.0 + sin((double)((f * 40.0) + (i * 19)))) * h0 * 2); 37 h = 5 + ((1.0 + sin((double)((f * 40.0) + (i * 19)))) * h0 * 2); 38 x = (win_w / 2) - (w / 2); 38 x = (win_w / 2) - (w / 2); 39 x += sin((double)((f * 50.0) + (i * 13))) * (w0 / 2); 39 x += (Evas_Coord)(sin((double)((f * 50.0) + (i * 13))) * (w0 / 2)); 40 y = (win_h / 2) - (h / 2); 40 y = (win_h / 2) - (h / 2); 41 y += cos((double)((f * 45.0) + (i * 28))) * (h0 / 2); 41 y += (Evas_Coord)(cos((double)((f * 45.0) + (i * 28))) * (h0 / 2)); 42 evas_object_geometry_set(o, x, y, w, h); 42 evas_object_geometry_set(o, x, y, w, h); 43 } 43 } 44 } 44 } diff --git a/src/bin/elementary/perf_test_03.c b/src/bin/elementary/perf_test_03.cindex 065bd6d984..6737bedac5 100644--- a/src/bin/elementary/perf_test_03.c+++ b/src/bin/elementary/perf_test_03.c @@ -36,9 +36,9 @@ TST(03, tick) (Evas *e EINA_UNUSED, double f, Evas_Coord win_w, Evas_Coord win_h 36 w = 5 + ((1.0 + cos((double)((f * 30.0) + (i * 10)))) * w0 * 2); 36 w = 5 + ((1.0 + cos((double)((f * 30.0) + (i * 10)))) * w0 * 2); 37 h = 5 + ((1.0 + sin((double)((f * 40.0) + (i * 19)))) * h0 * 2); 37 h = 5 + ((1.0 + sin((double)((f * 40.0) + (i * 19)))) * h0 * 2); 38 x = (win_w / 2) - (w / 2); 38 x = (win_w / 2) - (w / 2); 39 x += sin((double)((f * 50.0) + (i * 13))) * (w0 / 2); 39 x += (Evas_Coord)(sin((double)((f * 50.0) + (i * 13))) * (w0 / 2)); 40 y = (win_h / 2) - (h / 2); 40 y = (win_h / 2) - (h / 2); 41 y += cos((double)((f * 45.0) + (i * 28))) * (h0 / 2); 41 y += (Evas_Coord)(cos((double)((f * 45.0) + (i * 28))) * (h0 / 2)); 42 evas_object_geometry_set(o, x, y, w, h); 42 evas_object_geometry_set(o, x, y, w, h); 43 } 43 } 44 } 44 }