summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-13 14:11:58 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-13 14:14:37 -0800
commitabb8797e12c3c3e5fc86ae6b36391a3334026aa0 (patch)
treec89229da86ef8bc061edd6eb12536727d02add0d
parent6d9bdc10f349090e092887222e0e03202b1b0d55 (diff)
Handle -Wdouble-promotion warning from clang
xvinfo.c:217:73: warning: implicit conversion increases floating-point precision: 'float' to 'double' [-Wdouble-promotion] (float) encodings[n].rate.numerator / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xvinfo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xvinfo.c b/xvinfo.c
index d7f7ee6..fd17432 100644
--- a/xvinfo.c
+++ b/xvinfo.c
@@ -214,8 +214,8 @@ main(int argc, char *argv[])
fprintf(stdout, " size: %li x %li\n",
encodings[n].width, encodings[n].height);
fprintf(stdout, " rate: %f\n",
- (float) encodings[n].rate.numerator /
- (float) encodings[n].rate.denominator);
+ (double) encodings[n].rate.numerator /
+ (double) encodings[n].rate.denominator);
}
}
}