[vlc-commits] variables: check that FLT_RADIX is two

Rémi Denis-Courmont git at videolan.org
Sun Oct 26 19:57:18 CET 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct 26 20:57:07 2014 +0200| [fe2a7b4912614bad4a46809bb319d3f7ec68a2a4] | committer: Rémi Denis-Courmont

variables: check that FLT_RADIX is two

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fe2a7b4912614bad4a46809bb319d3f7ec68a2a4
---

 src/misc/variables.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/misc/variables.c b/src/misc/variables.c
index 3005074..04b3750 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -1321,6 +1321,9 @@ int (var_InheritURational)(vlc_object_t *object,
             d = 1;
         } else if (exp <= 0) {
             n = floor(scalbn(f, ubits - 1 + exp));
+#if (FLT_RADIX != 2)
+# error Floating point configuration not supported.
+#endif
             d = 1u << (ubits - 1);
         } else if (exp <= ubits) {
             n = floor(scalbn(f, ubits));



More information about the vlc-commits mailing list