vrend_object.c: Fix warnings

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

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Gert Wollny 7 years ago committed by Jakob Bornecrantz
parent a52d2ef49a
commit e96a5e8594
  1. 8
      src/vrend_object.c

@ -125,7 +125,8 @@ void vrend_object_fini_resource_table(void)
uint32_t uint32_t
vrend_object_insert_nofree(struct util_hash_table *handle_hash, 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); struct vrend_object *obj = CALLOC_STRUCT(vrend_object);
@ -149,10 +150,9 @@ vrend_object_insert(struct util_hash_table *handle_hash,
void void
vrend_object_remove(struct util_hash_table *handle_hash, 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)); util_hash_table_remove(handle_hash, intptr_to_pointer(handle));
} }
void *vrend_object_lookup(struct util_hash_table *handle_hash, 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)); 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; struct vrend_object *obj;
obj = util_hash_table_get(res_hash, intptr_to_pointer(handle)); obj = util_hash_table_get(res_hash, intptr_to_pointer(handle));

Loading…
Cancel
Save