From 7fe13b8616177d997dde4539349338d5ceb325da Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 23 Nov 2017 01:04:29 +0100 Subject: [PATCH] Fix some Clang warnings. --- fp16.h | 2 +- init.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/fp16.h b/fp16.h index 56a5607..535eccf 100644 --- 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 - f.u += ((15 - 127) << 23) + 0xfff; + f.u += (unsigned(15 - 127) << 23) + 0xfff; // rounding bias part 2 f.u += mant_odd; // take the bits! diff --git a/init.cpp b/init.cpp index 44dd723..ce2ce50 100644 --- a/init.cpp +++ b/init.cpp @@ -351,6 +351,18 @@ double get_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, -- 2.39.2