turnip: delete tu_physical_device path field
authorJonathan Marek <jonathan@marek.ca>
Thu, 13 Aug 2020 17:50:46 +0000 (13:50 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 9 Sep 2020 17:01:51 +0000 (17:01 +0000)
Resolves a "strncpy specified bound 20 equals destination size" warning.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6664>

src/freedreno/vulkan/tu_drm.c
src/freedreno/vulkan/tu_private.h

index 50bca53..7994214 100644 (file)
@@ -301,8 +301,6 @@ tu_drm_device_init(struct tu_physical_device *device,
 
    vk_object_base_init(NULL, &device->base, VK_OBJECT_TYPE_PHYSICAL_DEVICE);
    device->instance = instance;
-   assert(strlen(path) < ARRAY_SIZE(device->path));
-   strncpy(device->path, path, ARRAY_SIZE(device->path));
 
    if (instance->enabled_extensions.KHR_display) {
       master_fd =
index e02290b..dec2ebe 100644 (file)
@@ -178,7 +178,6 @@ struct tu_physical_device
 
    struct tu_instance *instance;
 
-   char path[20];
    char name[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE];
    uint8_t driver_uuid[VK_UUID_SIZE];
    uint8_t device_uuid[VK_UUID_SIZE];