[virglrenderer-devel] [PATCH 02/16] gallium/aux/cso_cache.c: Fix warnings
Gert Wollny
gert.wollny at collabora.com
Thu May 31 09:15:34 UTC 2018
cso_cache.c: In Funktion »delete_blend_state«:
cso_cache.c:90:51: Warnung: unused parameter »data« [-Wunused-parameter]
static void delete_blend_state(void *state, void *data)
^~~~
cso_cache.c: In Funktion »delete_depth_stencil_state«:
cso_cache.c:98:59: Warnung: unused parameter »data« [-Wunused-parameter]
static void delete_depth_stencil_state(void *state, void *data)
^~~~
cso_cache.c: In Funktion »delete_sampler_state«:
cso_cache.c:106:53: Warnung: unused parameter »data« [-Wunused-
parameter]
static void delete_sampler_state(void *state, void *data)
^~~~
cso_cache.c: In Funktion »delete_rasterizer_state«:
cso_cache.c:114:56: Warnung: unused parameter »data« [-Wunused-
parameter]
static void delete_rasterizer_state(void *state, void *data)
^~~~
cso_cache.c: In Funktion »delete_velements«:
cso_cache.c:122:49: Warnung: unused parameter »data« [-Wunused-
parameter]
static void delete_velements(void *state, void *data)
^~~~
cso_cache.c: In Funktion »sanitize_cb«:
cso_cache.c:166:52: Warnung: unused parameter »user_data« [-Wunused-
parameter]
... int max_size, void *user_data)
cso_cache.c: In function 'delete_velements':
cso_cache.c:126:49: warning: unused parameter 'data' [-Wunused-
parameter]
static void delete_velements(void *state, void *data)
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
---
src/gallium/auxiliary/cso_cache/cso_cache.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/auxiliary/cso_cache/cso_cache.c b/src/gallium/auxiliary/cso_cache/cso_cache.c
index d36f1fb..3ab62e0 100644
--- a/src/gallium/auxiliary/cso_cache/cso_cache.c
+++ b/src/gallium/auxiliary/cso_cache/cso_cache.c
@@ -89,6 +89,7 @@ static inline struct cso_hash *_cso_hash_for_type(struct cso_cache *sc, enum cso
static void delete_blend_state(void *state, void *data)
{
+ VREND_UNUSED(data);
struct cso_blend *cso = (struct cso_blend *)state;
if (cso->delete_state)
cso->delete_state(cso->context, cso->data);
@@ -97,6 +98,7 @@ static void delete_blend_state(void *state, void *data)
static void delete_depth_stencil_state(void *state, void *data)
{
+ VREND_UNUSED(data);
struct cso_depth_stencil_alpha *cso = (struct cso_depth_stencil_alpha *)state;
if (cso->delete_state)
cso->delete_state(cso->context, cso->data);
@@ -105,6 +107,7 @@ static void delete_depth_stencil_state(void *state, void *data)
static void delete_sampler_state(void *state, void *data)
{
+ VREND_UNUSED(data);
struct cso_sampler *cso = (struct cso_sampler *)state;
if (cso->delete_state)
cso->delete_state(cso->context, cso->data);
@@ -113,6 +116,7 @@ static void delete_sampler_state(void *state, void *data)
static void delete_rasterizer_state(void *state, void *data)
{
+ VREND_UNUSED(data);
struct cso_rasterizer *cso = (struct cso_rasterizer *)state;
if (cso->delete_state)
cso->delete_state(cso->context, cso->data);
@@ -121,6 +125,7 @@ static void delete_rasterizer_state(void *state, void *data)
static void delete_velements(void *state, void *data)
{
+ VREND_UNUSED(data);
struct cso_velements *cso = (struct cso_velements *)state;
if (cso->delete_state)
cso->delete_state(cso->context, cso->data);
@@ -165,6 +170,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)
{
+ VREND_UNUSED(user_data);
/* if we're approach the maximum size, remove fourth of the entries
* otherwise every subsequent call will go through the same */
int hash_size = cso_hash_size(hash);
--
2.16.1
More information about the virglrenderer-devel
mailing list