gallium/aux/cso_cache: Fix various warnings
authorGert Wollny <gert.wollny@collabora.com>
Tue, 5 Jun 2018 11:58:45 +0000 (13:58 +0200)
committerGert Wollny <gw.fossdev@gmail.com>
Wed, 20 Jun 2018 09:08:28 +0000 (11:08 +0200)
cso_cache.c: In Function »delete_blend_state«:
cso_cache/cso_cache.c:90:51: Warning: unused parameter »data« [-Wunused-
parameter]
 static void delete_blend_state(void *state, void *data)
                                                   ^~~~
cso_cache/cso_cache.c: In Funktion »delete_depth_stencil_state«:
cso_cache/cso_cache.c:98:59: Warning: unused parameter »data« [-Wunused-
parameter]
 static void delete_depth_stencil_state(void *state, void *data)
                                                           ^~~~
cso_cache/cso_cache.c: In Funktion »delete_sampler_state«:
cso_cache/cso_cache.c:106:53: Warning: unused parameter »data« [-
Wunused-parameter]
 static void delete_sampler_state(void *state, void *data)
                                                     ^~~~
cso_cache/cso_cache.c: In Funktion »delete_rasterizer_state«:
cso_cache/cso_cache.c:114:56: Warning: unused parameter »data« [-
Wunused-parameter]
 static void delete_rasterizer_state(void *state, void *data)
                                                        ^~~~
cso_cache/cso_cache.c: In Funktion »delete_velements«:
cso_cache/cso_cache.c:122:49: Warning: unused parameter »data« [-
Wunused-parameter]
 static void delete_velements(void *state, void *data)
                                                 ^~~~
cso_cache/cso_cache.c: In Funktion »sanitize_cb«:
cso_cache/cso_cache.c:166:52: Warning: unused parameter »user_data« [-
Wunused-parameter]
                                int max_size, void *user_data)
                                                    ^~~~~~~~~
gallium/aux/cso_context.c: a -Wunused-parameter warning

cso_cache/cso_context.c: In Funktion »delete_sampler_state«:
cso_cache/cso_context.c:163:57: Warning: unused parameter »ctx« [-
Wunused-parameter]
 static boolean delete_sampler_state(struct cso_context *ctx, void
*state)
                                                         ^~~

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/gallium/auxiliary/cso_cache/cso_cache.c
src/gallium/auxiliary/cso_cache/cso_context.c

index b240c938dcc7154abaf4365796e18d09eb8e7a73..4c1a76d9022f1d477ae4887c62ee710b47f041ff 100644 (file)
@@ -87,7 +87,7 @@ static inline struct cso_hash *_cso_hash_for_type(struct cso_cache *sc, enum cso
    return hash;
 }
 
-static void delete_blend_state(void *state, void *data)
+static void delete_blend_state(void *state, UNUSED void *data)
 {
    struct cso_blend *cso = (struct cso_blend *)state;
    if (cso->delete_state)
@@ -95,7 +95,7 @@ static void delete_blend_state(void *state, void *data)
    FREE(state);
 }
 
-static void delete_depth_stencil_state(void *state, void *data)
+static void delete_depth_stencil_state(void *state, UNUSED void *data)
 {
    struct cso_depth_stencil_alpha *cso = (struct cso_depth_stencil_alpha *)state;
    if (cso->delete_state)
@@ -103,7 +103,7 @@ static void delete_depth_stencil_state(void *state, void *data)
    FREE(state);
 }
 
-static void delete_sampler_state(void *state, void *data)
+static void delete_sampler_state(void *state, UNUSED void *data)
 {
    struct cso_sampler *cso = (struct cso_sampler *)state;
    if (cso->delete_state)
@@ -111,7 +111,7 @@ static void delete_sampler_state(void *state, void *data)
    FREE(state);
 }
 
-static void delete_rasterizer_state(void *state, void *data)
+static void delete_rasterizer_state(void *state, UNUSED void *data)
 {
    struct cso_rasterizer *cso = (struct cso_rasterizer *)state;
    if (cso->delete_state)
@@ -119,7 +119,7 @@ static void delete_rasterizer_state(void *state, void *data)
    FREE(state);
 }
 
-static void delete_velements(void *state, void *data)
+static void delete_velements(void *state, UNUSED void *data)
 {
    struct cso_velements *cso = (struct cso_velements *)state;
    if (cso->delete_state)
@@ -163,7 +163,7 @@ static inline void sanitize_hash(struct cso_cache *sc,
 
 
 static inline void sanitize_cb(struct cso_hash *hash, enum cso_cache_type type,
-                               int max_size, void *user_data)
+                              int max_size, UNUSED void *user_data)
 {
    /* if we're approach the maximum size, remove fourth of the entries
     * otherwise every subsequent call will go through the same */
index 2543c5ff61fa5f38ff585c57acbf6cbedca1bcf1..97cb77ee8e86190c91828c0f12d1383eb03e152f 100644 (file)
@@ -160,7 +160,7 @@ static boolean delete_depth_stencil_state(struct cso_context *ctx, void *state)
    return TRUE;
 }
 
-static boolean delete_sampler_state(struct cso_context *ctx, void *state)
+static boolean delete_sampler_state(UNUSED struct cso_context *ctx, void *state)
 {
    struct cso_sampler *cso = (struct cso_sampler *)state;
    if (cso->delete_state)