gbm/dri: Fix const confusion
authorKristian Høgsberg <krh@bitplanet.net>
Fri, 16 Jan 2015 22:29:40 +0000 (14:29 -0800)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 16 Jan 2015 22:29:40 +0000 (14:29 -0800)
The driver name is no longer const, it's always allocated dynamically
one way or another.  Drop const from dri_screen_create_dri2
driver_name argument to avoid warning.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
src/gbm/backends/dri/gbm_dri.c

index 39e6b30d473aa298030e929f6de09b4ef0fbcf40..c5136723162e67a2cdf1c81c3ff9f581f02c2330 100644 (file)
@@ -404,8 +404,7 @@ dri_load_driver_swrast(struct gbm_dri_device *dri)
 }
 
 static int
-dri_screen_create_dri2(struct gbm_dri_device *dri,
-                       const char *driver_name)
+dri_screen_create_dri2(struct gbm_dri_device *dri, char *driver_name)
 {
    const __DRIextension **extensions;
    int ret = 0;
@@ -495,7 +494,7 @@ dri_screen_create_swrast(struct gbm_dri_device *dri)
 static int
 dri_screen_create(struct gbm_dri_device *dri)
 {
-   const char *driver_name;
+   char *driver_name;
 
    driver_name = loader_get_driver_for_fd(dri->base.base.fd, 0);
    if (!driver_name)
@@ -507,7 +506,7 @@ dri_screen_create(struct gbm_dri_device *dri)
 static int
 dri_screen_create_sw(struct gbm_dri_device *dri)
 {
-   const char *driver_name;
+   char *driver_name;
    int ret;
 
    driver_name = strdup("kms_swrast");