[virglrenderer-devel] [PATCH v2 14/21] vrend_object.c: Fix warnings
Gert Wollny
gert.wollny at collabora.com
Tue Jun 5 20:11:11 UTC 2018
vrend_object.c: In function »vrend_object_insert_nofree«:
vrend_object.c:128:49: warning: unused parameter »length« [-Wunused-
parameter]
void *data, uint32_t length, uint32_t
handle, enum virgl_object_type type, bool free_data)
^~~~~~
vrend_object.c: In function »vrend_object_remove«:
vrend_object.c:152:61: warning: unused parameter »type« [-Wunused-
parameter]
uint32_t handle, enum virgl_object_type type)
^~~~
vrend_object.c: In function »vrend_resource_lookup«:
vrend_object.c:195:55: warning: unused parameter »ctx_id« [-Wunused-
parameter]
void *vrend_resource_lookup(uint32_t handle, uint32_t ctx_id)
v2: Use mesa style UNUSED annotation for unused parameters
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
---
src/vrend_object.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/vrend_object.c b/src/vrend_object.c
index 3fcf21a..c00731a 100644
--- a/src/vrend_object.c
+++ b/src/vrend_object.c
@@ -125,7 +125,8 @@ void vrend_object_fini_resource_table(void)
uint32_t
vrend_object_insert_nofree(struct util_hash_table *handle_hash,
- void *data, uint32_t length, uint32_t handle, enum virgl_object_type type, bool free_data)
+ void *data, UNUSED uint32_t length, uint32_t handle,
+ enum virgl_object_type type, bool free_data)
{
struct vrend_object *obj = CALLOC_STRUCT(vrend_object);
@@ -149,10 +150,9 @@ vrend_object_insert(struct util_hash_table *handle_hash,
void
vrend_object_remove(struct util_hash_table *handle_hash,
- uint32_t handle, enum virgl_object_type type)
+ uint32_t handle, UNUSED enum virgl_object_type type)
{
util_hash_table_remove(handle_hash, intptr_to_pointer(handle));
-
}
void *vrend_object_lookup(struct util_hash_table *handle_hash,
@@ -192,7 +192,7 @@ void vrend_resource_remove(uint32_t handle)
util_hash_table_remove(res_hash, intptr_to_pointer(handle));
}
-void *vrend_resource_lookup(uint32_t handle, uint32_t ctx_id)
+void *vrend_resource_lookup(uint32_t handle, UNUSED uint32_t ctx_id)
{
struct vrend_object *obj;
obj = util_hash_table_get(res_hash, intptr_to_pointer(handle));
--
2.16.4
More information about the virglrenderer-devel
mailing list