summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2017-11-16 16:09:48 +0100
committerBrian Paul <[email protected]>2017-11-17 09:27:57 -0700
commit82e2f1ea34c8479b7bc35e5b750e0c329aade582 (patch)
tree8c17e118056c5703543721e74e44312d10dd7c4a /src/gallium/auxiliary
parenta5da06d9b76a2c9271b8518178ee613c4553ab9f (diff)
gallium/aux/util/u_threaded_context.c: Fix some -Wunused-param warnings.
Decorate the params accordingly with UNUSED or MAYBE_UNUSED (for params that are used in debug mode). v2: move *UNUSED decoration in front of parameter declaration Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1)
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_threaded_context.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c
index b05cffd754d..b212393a5ba 100644
--- a/src/gallium/auxiliary/util/u_threaded_context.c
+++ b/src/gallium/auxiliary/util/u_threaded_context.c
@@ -64,7 +64,7 @@ typedef void (*tc_execute)(struct pipe_context *pipe, union tc_payload *payload)
static const tc_execute execute_func[TC_NUM_CALLS];
static void
-tc_batch_check(struct tc_batch *batch)
+tc_batch_check(MAYBE_UNUSED struct tc_batch *batch)
{
tc_assert(batch->sentinel == TC_SENTINEL);
tc_assert(batch->num_total_call_slots <= TC_CALLS_PER_BATCH);
@@ -80,7 +80,7 @@ tc_debug_check(struct threaded_context *tc)
}
static void
-tc_batch_execute(void *job, int thread_index)
+tc_batch_execute(void *job, UNUSED int thread_index)
{
struct tc_batch *batch = job;
struct pipe_context *pipe = batch->pipe;
@@ -180,7 +180,7 @@ tc_is_sync(struct threaded_context *tc)
}
static void
-_tc_sync(struct threaded_context *tc, const char *info, const char *func)
+_tc_sync(struct threaded_context *tc, MAYBE_UNUSED const char *info, MAYBE_UNUSED const char *func)
{
struct tc_batch *last = &tc->batch_slots[tc->last];
struct tc_batch *next = &tc->batch_slots[tc->next];
@@ -211,8 +211,9 @@ _tc_sync(struct threaded_context *tc, const char *info, const char *func)
if (synced) {
p_atomic_inc(&tc->num_syncs);
- if (tc_strcmp(func, "tc_destroy") != 0)
+ if (tc_strcmp(func, "tc_destroy") != 0) {
tc_printf("sync %s %s\n", func, info);
+ }
}
tc_debug_check(tc);
@@ -1845,16 +1846,16 @@ tc_fence_server_sync(struct pipe_context *_pipe,
}
static struct pipe_video_codec *
-tc_create_video_codec(struct pipe_context *_pipe,
- const struct pipe_video_codec *templ)
+tc_create_video_codec(UNUSED struct pipe_context *_pipe,
+ UNUSED const struct pipe_video_codec *templ)
{
unreachable("Threaded context should not be enabled for video APIs");
return NULL;
}
static struct pipe_video_buffer *
-tc_create_video_buffer(struct pipe_context *_pipe,
- const struct pipe_video_buffer *templ)
+tc_create_video_buffer(UNUSED struct pipe_context *_pipe,
+ UNUSED const struct pipe_video_buffer *templ)
{
unreachable("Threaded context should not be enabled for video APIs");
return NULL;
@@ -2138,7 +2139,7 @@ static void
tc_call_generate_mipmap(struct pipe_context *pipe, union tc_payload *payload)
{
struct tc_generate_mipmap *p = (struct tc_generate_mipmap *)payload;
- bool MAYBE_UNUSED result = pipe->generate_mipmap(pipe, p->res, p->format,
+ MAYBE_UNUSED bool result = pipe->generate_mipmap(pipe, p->res, p->format,
p->base_level,
p->last_level,
p->first_layer,
@@ -2391,7 +2392,7 @@ struct tc_callback_payload {
};
static void
-tc_call_callback(struct pipe_context *pipe, union tc_payload *payload)
+tc_call_callback(UNUSED struct pipe_context *pipe, union tc_payload *payload)
{
struct tc_callback_payload *p = (struct tc_callback_payload *)payload;