diff options
author | Andreas Färber <andreas.faerber@web.de> | 2009-12-13 01:16:27 +0100 |
---|---|---|
committer | malc <av1474@comtv.ru> | 2010-01-07 10:57:33 +0300 |
commit | fd10a04ef185593494711ead63dbf1fc5cdbac69 (patch) | |
tree | 4a33967a0685109b9d2242f539959ad0b9fa6a8d /cocoa.m | |
parent | 04afa4a88c132f7ffb0ccfaf6f233a18c4089072 (diff) | |
download | qemu-fd10a04ef185593494711ead63dbf1fc5cdbac69.zip qemu-fd10a04ef185593494711ead63dbf1fc5cdbac69.tar.gz qemu-fd10a04ef185593494711ead63dbf1fc5cdbac69.tar.bz2 |
Cocoa: Silence type warning
Add const for "qemu" character literal, to avoid:
warning: initialization discards qualifiers from pointer target type
An earlier patch by John proposed to use char[5]. Since we do not modify
the text and later copy it into malloc'ed memory, marking it as const
seems sufficient.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: John Arbuckle <programmingkidx@gmail.com>
Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'cocoa.m')
-rw-r--r-- | cocoa.m | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -791,7 +791,7 @@ static int cocoa_keycode_to_qemu(int keycode) if(returnCode == NSCancelButton) { exit(0); } else if(returnCode == NSOKButton) { - char *bin = "qemu"; + const char *bin = "qemu"; char *img = (char*)[ [ sheet filename ] cStringUsingEncoding:NSASCIIStringEncoding]; char **argv = (char**)malloc( sizeof(char*)*3 ); |