]> git.sesse.net Git - movit/commitdiff
Fix some Clang warnings.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 23 Nov 2017 00:04:29 +0000 (01:04 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 23 Nov 2017 00:04:29 +0000 (01:04 +0100)
fp16.h
init.cpp

diff --git a/fp16.h b/fp16.h
index 56a5607c5886b07cb3a38af711d48087c4565ab0..535eccf36b04c181f08cc432b3fca5785ca54da4 100644 (file)
--- a/fp16.h
+++ b/fp16.h
@@ -106,7 +106,7 @@ static inline fp16_int_t fp32_to_fp16(float x)
                        unsigned int mant_odd = (f.u >> 13) & 1; // resulting mantissa is odd
 
                        // update exponent, rounding bias part 1
                        unsigned int mant_odd = (f.u >> 13) & 1; // resulting mantissa is odd
 
                        // update exponent, rounding bias part 1
-                       f.u += ((15 - 127) << 23) + 0xfff;
+                       f.u += (unsigned(15 - 127) << 23) + 0xfff;
                        // rounding bias part 2
                        f.u += mant_odd;
                        // take the bits!
                        // rounding bias part 2
                        f.u += mant_odd;
                        // take the bits!
index 44dd7231011d6edccd6988291dee26ff0f49f291..ce2ce5009c3b7412ea1d181c09c64260653bac8d 100644 (file)
--- a/init.cpp
+++ b/init.cpp
@@ -351,6 +351,18 @@ double get_glsl_version()
        return glsl_version;
 }
 
        return glsl_version;
 }
 
+void APIENTRY debug_callback(GLenum source,
+                             GLenum type,
+                             GLuint id,
+                             GLenum severity,
+                             GLsizei length,
+                             const char *message,
+                             const void *userParam)
+#ifdef __GNUC__
+       __attribute__((unused))
+#endif
+;
+
 void APIENTRY debug_callback(GLenum source,
                              GLenum type,
                              GLuint id,
 void APIENTRY debug_callback(GLenum source,
                              GLenum type,
                              GLuint id,