summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Woelders <kim@woelders.dk>2019-02-09 09:05:52 +0100
committerKim Woelders <kim@woelders.dk>2019-02-10 05:51:07 +0100
commit722ca7bb8182fa568c95ccff1d107754ac7e5c1e (patch)
tree021bdf52544741995ea6f9b4704f6c0578ee85eb
parentde7383cb1a9c82895f8726c46e86342c72a5ca16 (diff)
Warning fixes for gcc 9
-rw-r--r--epplets/cloak.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epplets/cloak.c b/epplets/cloak.c
index e5ebb19..321c9d2 100644
--- a/epplets/cloak.c
+++ b/epplets/cloak.c
@@ -853,9 +853,9 @@ draw_ball(void)
853 { 853 {
854 ball_x = rand() % 39; 854 ball_x = rand() % 39;
855 ball_y = rand() % 39; 855 ball_y = rand() % 39;
856 while (abs(d_x) < 0.5) 856 while (fabs(d_x) < 0.5)
857 d_x = ((double)rand() / RAND_MAX * 4) - 2.0; 857 d_x = ((double)rand() / RAND_MAX * 4) - 2.0;
858 while (abs(d_y) < 0.5) 858 while (fabs(d_y) < 0.5)
859 d_y = ((double)rand() / RAND_MAX * 4) - 2.0; 859 d_y = ((double)rand() / RAND_MAX * 4) - 2.0;
860 blank_buf(); 860 blank_buf();
861 setup = 1; 861 setup = 1;
@@ -997,7 +997,7 @@ aa_line(int x1, int y1, int x2, int y2, unsigned char b,
997 line_width = (x2 - x1); 997 line_width = (x2 - x1);
998 line_height = (y2 - y1); 998 line_height = (y2 - y1);
999 999
1000 if (abs(line_width) > abs(line_height)) 1000 if (fabs(line_width) > fabs(line_height))
1001 { 1001 {
1002 if (x1 > x2) 1002 if (x1 > x2)
1003 { 1003 {
@@ -1013,7 +1013,7 @@ aa_line(int x1, int y1, int x2, int y2, unsigned char b,
1013 1013
1014 /* This is currently broken. It is supposed to account 1014 /* This is currently broken. It is supposed to account
1015 * for lines that don't span more than one pixel */ 1015 * for lines that don't span more than one pixel */
1016 if (abs(line_width) < 0.1) 1016 if (fabs(line_width) < 0.1)
1017 { 1017 {
1018 x2 = x1 + 0.5; 1018 x2 = x1 + 0.5;
1019 x1 -= 0.5; 1019 x1 -= 0.5;
@@ -1101,7 +1101,7 @@ aa_line(int x1, int y1, int x2, int y2, unsigned char b,
1101 } 1101 }
1102 1102
1103 /* This is currently broken */ 1103 /* This is currently broken */
1104 if (abs(line_height) < 0.1) 1104 if (fabs(line_height) < 0.1)
1105 { 1105 {
1106 y2 = y1 + 0.5; 1106 y2 = y1 + 0.5;
1107 y1 -= 0.5; 1107 y1 -= 0.5;