summaryrefslogtreecommitdiff
path: root/hw/xfree86
diff options
context:
space:
mode:
authorMichel Dänzer <mdaenzer@redhat.com>2020-01-28 18:22:45 +0100
committerPeter Hutterer <peter.hutterer@who-t.net>2020-01-28 20:35:06 +0000
commit65387391a551fff6fec808d48b9bf4b6181cb050 (patch)
treebb83fee63c51e9415c5db75b28770da380b5f0e0 /hw/xfree86
parente1fa3beb2fe2519e69f859f0acdc68e5a770de27 (diff)
loader: strdup const string assigned to local variable name
There's a free(name) at the end of the function. GCC warned about this: ../hw/xfree86/loader/loadmod.c: In function ‘LoadModule’: ../hw/xfree86/loader/loadmod.c:702:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 702 | m = name = "int10"; | ^
Diffstat (limited to 'hw/xfree86')
-rw-r--r--hw/xfree86/loader/loadmod.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 81a3a1dd9..f8a44827f 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -699,7 +699,7 @@ LoadModule(const char *module, void *options, const XF86ModReqInfo *modreq,
/* Backward compatibility, vbe and int10 are merged into int10 now */
if (!strcmp(m, "vbe"))
- m = name = "int10";
+ m = name = strdup("int10");
for (cim = compiled_in_modules; *cim; cim++)
if (!strcmp(m, *cim)) {