summaryrefslogtreecommitdiffstats
path: root/src/util/half_float.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/half_float.c')
-rw-r--r--src/util/half_float.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/half_float.c b/src/util/half_float.c
index 2eff2c84f51..63aec5c5c14 100644
--- a/src/util/half_float.c
+++ b/src/util/half_float.c
@@ -28,6 +28,7 @@
#include <assert.h>
#include "half_float.h"
#include "rounding.h"
+#include "macros.h"
typedef union { float f; int32_t i; uint32_t u; } fi_type;
@@ -186,7 +187,7 @@ uint8_t _mesa_half_to_unorm8(uint16_t val)
{
const int m = val & 0x3ff;
const int e = (val >> 10) & 0x1f;
- const int s = (val >> 15) & 0x1;
+ MAYBE_UNUSED const int s = (val >> 15) & 0x1;
/* v = round_to_nearest(1.mmmmmmmmmm * 2^(e-15) * 255)
* = round_to_nearest((1.mmmmmmmmmm * 255) * 2^(e-15))