summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-11-16 10:39:04 +0100
committerNicolai Hähnle <[email protected]>2016-11-18 09:49:22 +0100
commitda2a51129bfcb761d10a7a0b3c6579aa0adc5137 (patch)
tree90e8a53d22b863a2e055888b724566f3b2391ec2
parent9882ed85bd603bf729c6d56c7f1922a477159b36 (diff)
st/mesa: silence warnings in optimized builds
Mark variables and static functions that only occur in assert()s as MAYBE_UNUSED. Reviewed-by: Ilia Mirkin <[email protected]>
-rw-r--r--src/mesa/state_tracker/st_sampler_view.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_sampler_view.c b/src/mesa/state_tracker/st_sampler_view.c
index 2b2fa8b5376..88d5d1aae2f 100644
--- a/src/mesa/state_tracker/st_sampler_view.c
+++ b/src/mesa/state_tracker/st_sampler_view.c
@@ -317,7 +317,7 @@ get_texture_format_swizzle(const struct st_context *st,
*
* \param stObj the st texture object,
*/
-static boolean
+MAYBE_UNUSED static boolean
check_sampler_swizzle(const struct st_context *st,
const struct st_texture_object *stObj,
const struct pipe_sampler_view *sv, unsigned glsl_version)
@@ -473,7 +473,7 @@ st_get_texture_sampler_view_from_stobj(struct st_context *st,
assert(gl_target_to_pipe(stObj->base.Target) == view->target);
if (stObj->base.Target == GL_TEXTURE_BUFFER) {
unsigned base = stObj->base.BufferOffset;
- unsigned size = MIN2(stObj->pt->width0 - base,
+ MAYBE_UNUSED unsigned size = MIN2(stObj->pt->width0 - base,
(unsigned) stObj->base.BufferSize);
assert(view->u.buf.offset == base);
assert(view->u.buf.size == size);