From: Kristian Høgsberg Date: Fri, 16 Jan 2015 22:29:40 +0000 (-0800) Subject: gbm/dri: Fix const confusion X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9bf2c7166aa24512c7a655f79c44fe9dc57f0b7b;p=mesa.git gbm/dri: Fix const confusion 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 --- diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 39e6b30d473..c5136723162 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -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");