diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-30 12:18:05 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-30 12:24:47 +0000 |
commit | ca2d9e69d08f5438a34dbf55ab058f5c4c3b3650 (patch) | |
tree | ee998d9c89ab9aa7d946170e3fcc805896eeb8e9 /src/sna/sna_display.c | |
parent | 5ef675159fd83ee393a86220eb4f8c514da8d0e7 (diff) |
sna: Suppress warning for freeing a "constant" string
We allocated and own the string, so we can free it!
sna_display.c: In function 'sna_output_get_modes':
sna_display.c:2314:4: warning: passing argument 1 of 'free' discards 'const' qualifier from pointer target type [enabled by default]
free(current->name);
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_display.c')
-rw-r--r-- | src/sna/sna_display.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 22f18416..2829af14 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -2311,7 +2311,7 @@ sna_output_get_modes(xf86OutputPtr output) if (current && (current->name == NULL || *current->name == '\0')) { char *str = canonical_mode_name(current); if (str) { - free(current->name); + free((char *)current->name); current->name = str; } } |