diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-04-23 14:10:40 -0700 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2020-04-24 14:43:24 +0200 |
commit | b8e58b75b57b94378990cedb38459623c06fc3eb (patch) | |
tree | 7b2a56a17d6ea805c278748bf29799ca81f68f93 /utils | |
parent | 9656473777ebe713c248072fd139ff312e22d7c6 (diff) |
utils: fix double promotions
Found with -Wdouble-promotion
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/rds-ctl/rds-ctl.cpp | 4 | ||||
-rw-r--r-- | utils/v4l2-compliance/v4l2-test-buffers.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/utils/rds-ctl/rds-ctl.cpp b/utils/rds-ctl/rds-ctl.cpp index 0e497b2a..558f5d76 100644 --- a/utils/rds-ctl/rds-ctl.cpp +++ b/utils/rds-ctl/rds-ctl.cpp @@ -521,7 +521,7 @@ static void print_rds_statistics(const struct v4l2_rds_statistics *statistics) printf("received blocks / received groups: %u / %u\n", statistics->block_cnt, statistics->group_cnt); - float block_error_percentage = 0; + double block_error_percentage = 0; if (statistics->block_cnt) block_error_percentage = @@ -530,7 +530,7 @@ static void print_rds_statistics(const struct v4l2_rds_statistics *statistics) statistics->block_error_cnt, block_error_percentage, statistics->group_error_cnt); - float block_corrected_percentage = 0; + double block_corrected_percentage = 0; if (statistics->block_cnt) block_corrected_percentage = ( diff --git a/utils/v4l2-compliance/v4l2-test-buffers.cpp b/utils/v4l2-compliance/v4l2-test-buffers.cpp index 561a3376..26947724 100644 --- a/utils/v4l2-compliance/v4l2-test-buffers.cpp +++ b/utils/v4l2-compliance/v4l2-test-buffers.cpp @@ -2597,7 +2597,7 @@ static void streamFmt(struct node *node, __u32 pixelformat, __u32 w, __u32 h, char hz[32] = ""; if (!frame_count) - frame_count = f ? static_cast<unsigned>(1.0f / fract2f(f)) : 10; + frame_count = f ? static_cast<unsigned>(1.0 / fract2f(f)) : 10; node->g_fmt(fmt); fmt.s_pixelformat(pixelformat); fmt.s_width(w); |