anv: Silence a couple compiler warnings
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 12 Sep 2018 22:02:57 +0000 (17:02 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 13 Sep 2018 02:20:27 +0000 (21:20 -0500)
[63/93] Compiling C object 'src/intel/vulkan/...intel@vulkan@@anv_common@sta/anv_device.c.o'.
../src/intel/vulkan/anv_device.c:685:30: warning: passing 'const char *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
   vk_free(&instance->alloc, instance->app_info.app_name);
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/vulkan/util/vk_alloc.h:62:51: note: passing argument to parameter 'data' here
vk_free(const VkAllocationCallbacks *alloc, void *data)
                                                  ^
../src/intel/vulkan/anv_device.c:686:30: warning: passing 'const char *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
   vk_free(&instance->alloc, instance->app_info.engine_name);
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/vulkan/util/vk_alloc.h:62:51: note: passing argument to parameter 'data' here
vk_free(const VkAllocationCallbacks *alloc, void *data)
                                                  ^
[65/93] Compiling C object 'src/intel/vulkan/...ommon@sta/anv_nir_apply_pipeline_layout.c.o'.
../src/intel/vulkan/anv_nir_apply_pipeline_layout.c:519:13: warning: unused variable 'image_uniform' [-Wunused-variable]
   unsigned image_uniform;

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_nir_apply_pipeline_layout.c

index 1e37876eb4363831f3f72afa9833a9e43deb0604..4219a073d2d6c470368a35d630242628d3a0c221 100644 (file)
@@ -682,8 +682,8 @@ void anv_DestroyInstance(
       anv_physical_device_finish(&instance->physicalDevice);
    }
 
-   vk_free(&instance->alloc, instance->app_info.app_name);
-   vk_free(&instance->alloc, instance->app_info.engine_name);
+   vk_free(&instance->alloc, (char *)instance->app_info.app_name);
+   vk_free(&instance->alloc, (char *)instance->app_info.engine_name);
 
    VG(VALGRIND_DESTROY_MEMPOOL(instance));
 
index 856101cc2ff934302f4d0669a0e51f0911ba2102..6868288e4865a78073e21912776a0e49026dee5a 100644 (file)
@@ -516,7 +516,6 @@ anv_nir_apply_pipeline_layout(struct anv_pipeline *pipeline,
       }
    }
 
-   unsigned image_uniform;
    if (map->image_count > 0) {
       assert(map->image_count <= MAX_IMAGES);
       assert(shader->num_uniforms == prog_data->nr_params * 4);