aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-04-02 20:18:50 -0700
committerGuy Harris <guy@alum.mit.edu>2014-04-03 03:19:23 +0000
commite982992f71b9e93d28ca3bf04d32105fa015949e (patch)
treee4a6f9eb5fcefab87bf83fe5ae6ee49578278b1b
parent9bd093289c61361104250269af70b3dd3d08bda6 (diff)
For single-precision calculations, use single-precision constants.
Otherwise the calculation is done in double precision, and some compilers complain of a double-precision value being assigned to a single-precision variable. Change-Id: I78317a0e9b625ae4f34df3597fdb5eba711bcae2 Reviewed-on: https://code.wireshark.org/review/934 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--epan/dissectors/file-png.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/file-png.c b/epan/dissectors/file-png.c
index ce68f934ce..7f813b5234 100644
--- a/epan/dissectors/file-png.c
+++ b/epan/dissectors/file-png.c
@@ -426,7 +426,7 @@ dissect_png_gama(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
float gamma;
- gamma = tvb_get_ntohl(tvb, 0) / 100000.0;
+ gamma = tvb_get_ntohl(tvb, 0) / 100000.0f;
proto_tree_add_float_format_value(tree, &hfi_png_gama_gamma,
tvb, 0, 4, gamma, "%f", gamma);
}