[spice-server v1 3/3] clang: remove double promotion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Victor Toso <me@xxxxxxxxxxxxxx>

> test-display-resolution-changes.c:55:60: error: implicit conversion
> increases floating-point precision: 'float' to 'double'
>       command->create_primary.width = 800 + sin((float)count / 6) * 200;
>                                             ~~~ ~~~~~~~~~~~~~^~~
> test-display-resolution-changes.c:56:61: error: implicit conversion
> increases floating-point precision: 'float' to 'double'
>       command->create_primary.height = 600 + cos((float)count / 6) * 200;
>                                              ~~~ ~~~~~~~~~~~~~^~~

Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx>
---
 server/tests/test-display-resolution-changes.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/tests/test-display-resolution-changes.c b/server/tests/test-display-resolution-changes.c
index f6bb0839..74e71a7d 100644
--- a/server/tests/test-display-resolution-changes.c
+++ b/server/tests/test-display-resolution-changes.c
@@ -52,8 +52,8 @@ set_primary_params(SPICE_GNUC_UNUSED Test *test, Command *command)
 #endif
     static int count = 0;
 
-    command->create_primary.width = 800 + sin((float)count / 6) * 200;
-    command->create_primary.height = 600 + cos((float)count / 6) * 200;
+    command->create_primary.width = 800 + sin(count / 6.0) * 200;
+    command->create_primary.height = 600 + cos(count / 6.0) * 200;
     count++;
 }
 
-- 
2.15.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]