diff options
author | Victor Toso <me@victortoso.com> | 2017-12-21 16:18:08 +0100 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2018-01-08 10:20:30 +0000 |
commit | 07c7e236fc09f55b62ab57128910d55dd9a39daf (patch) | |
tree | a288f6ca21fdcf4eaf52646ebf41f75cb09b776c | |
parent | e005e7017bd23bf0bfdf62852feff61477306cc3 (diff) |
clang: remove double promotion
> 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@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r-- | server/tests/test-display-resolution-changes.c | 4 |
1 files 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++; } |