diff options
author | Gerasimos Dimitriadis <dimeg@intracom.gr> | 2010-01-23 21:34:27 +0000 |
---|---|---|
committer | Gerasimos Dimitriadis <dimeg@intracom.gr> | 2010-01-23 21:34:27 +0000 |
commit | effc28a97cb03a771bbe6d74ae754fd8b184c4cc (patch) | |
tree | 6a61c069dbbe248110a05bbb25f2cf32fd265225 /epan | |
parent | 10ee7a707d6c688f8b41ee13e58a3111bcc68e63 (diff) |
Insert casts to float to make the buildbot happy
svn path=/trunk/; revision=31637
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-ansi_801.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-ansi_801.c b/epan/dissectors/packet-ansi_801.c index 92d779f6d9..d6a767443e 100644 --- a/epan/dissectors/packet-ansi_801.c +++ b/epan/dissectors/packet-ansi_801.c @@ -858,21 +858,21 @@ pr_loc_response(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset) /* LAT */ value = tvb_get_bits32(tvb, bit_offset, 25, FALSE); - fl_value = -90.0 + ((float)value * 180 / 33554432); + fl_value = (float)(-90.0 + ((float)value * 180 / 33554432)); proto_tree_add_float_bits_format_value(tree, hf_ansi_801_lat, tvb, bit_offset, 25, fl_value, "%.5f degrees %s (0x%08x)", fabs(fl_value), fl_value < 0 ? "South" : "North", value); bit_offset += 25; /* LONG */ value = tvb_get_bits32(tvb, bit_offset, 26, FALSE); - fl_value = -180.0 + ((float)value * 180 / 33554432); + fl_value = (float)(-180.0 + ((float)value * 180 / 33554432)); proto_tree_add_float_bits_format_value(tree, hf_ansi_801_long, tvb, bit_offset, 26, fl_value, "%.5f degrees %s (0x%08x)", fabs(fl_value), fl_value < 0 ? "West" : "East", value); bit_offset += 26; /* LOC_UNCRTNTY_ANG */ value = tvb_get_bits8(tvb, bit_offset, 4); - fl_value = 5.625 * value; + fl_value = (float)(5.625 * value); proto_tree_add_float_bits_format_value(tree, hf_ansi_801_loc_uncrtnty_ang, tvb, bit_offset, 4, fl_value, "%.5f degrees (0x%02x)", fl_value, value); bit_offset += 4; @@ -884,7 +884,7 @@ pr_loc_response(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset) case 0x1e: str = "> 12288.00 meters"; break; case 0x1f: str = "Not computable"; break; default: - fl_value = 0.5 * (1 << (value >> 1)); + fl_value = (float)(0.5 * (1 << (value >> 1))); if (value & 0x01) fl_value *= 1.5; str = ep_strdup_printf("%.2f meters", fl_value); @@ -900,7 +900,7 @@ pr_loc_response(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset) case 0x1e: str = "> 12288.00 meters"; break; case 0x1f: str = "Not computable"; break; default: - fl_value = 0.5 * (1 << (value >> 1)); + fl_value = (float)(0.5 * (1 << (value >> 1))); if (value & 0x01) fl_value *= 1.5; str = ep_strdup_printf("%.2f meters", fl_value); @@ -920,7 +920,7 @@ pr_loc_response(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset) { /* VELOCITY_HOR */ value = tvb_get_bits16(tvb, bit_offset, 9, FALSE); - fl_value = 0.25 * value; + fl_value = (float)(0.25 * value); proto_tree_add_float_bits_format_value(tree, hf_ansi_801_velocity_hor, tvb, bit_offset, 9, fl_value, "%.2f m/s (0x%04x)", fl_value, value); bit_offset += 9; @@ -936,7 +936,7 @@ pr_loc_response(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset) { /* VELOCITY_VER */ value = tvb_get_bits8(tvb, bit_offset, 8); - fl_value = -64 + 0.5 * value; + fl_value = (float)(-64 + 0.5 * value); proto_tree_add_float_bits_format_value(tree, hf_ansi_801_velocity_ver, tvb, bit_offset, 8, fl_value, "%.1f m/s (0x%02x)", fl_value, value); bit_offset += 8; @@ -979,7 +979,7 @@ pr_loc_response(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset) case 0x1e: str = "> 12288.00 meters"; break; case 0x1f: str = "Not computable"; break; default: - fl_value = 0.5 * (1 << (value >> 1)); + fl_value = (float)(0.5 * (1 << (value >> 1))); if (value & 0x01) fl_value *= 1.5; str = ep_strdup_printf("%.2f meters", fl_value); |