Everything else in the floating-point calculations is single-precision,

so make the constants single-precision, so we don't end up with warnings
about double-precision values being assigned to single-precision
variables.

svn path=/trunk/; revision=46658
This commit is contained in:
Guy Harris 2012-12-21 08:18:47 +00:00
parent be77dce42a
commit 808c79a6b4
1 changed files with 3 additions and 3 deletions

View File

@ -781,7 +781,7 @@ pr_loc_response(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset)
default:
fl_value = (float)(0.5 * (1 << (value >> 1)));
if (value & 0x01)
fl_value *= 1.5;
fl_value *= 1.5f;
str = ep_strdup_printf("%.2f meters", fl_value);
}
proto_tree_add_uint_bits_format_value(tree, hf_ansi_801_loc_uncrtnty_a, tvb, bit_offset, 5, value,
@ -797,7 +797,7 @@ pr_loc_response(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset)
default:
fl_value = (float)(0.5 * (1 << (value >> 1)));
if (value & 0x01)
fl_value *= 1.5;
fl_value *= 1.5f;
str = ep_strdup_printf("%.2f meters", fl_value);
}
proto_tree_add_uint_bits_format_value(tree, hf_ansi_801_loc_uncrtnty_p, tvb, bit_offset, 5, value,
@ -876,7 +876,7 @@ pr_loc_response(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset)
default:
fl_value = (float)(0.5 * (1 << (value >> 1)));
if (value & 0x01)
fl_value *= 1.5;
fl_value *= 1.5f;
str = ep_strdup_printf("%.2f meters", fl_value);
}
proto_tree_add_uint_bits_format_value(tree, hf_ansi_801_loc_uncrtnty_v, tvb, bit_offset, 5, value,