From fd10a04ef185593494711ead63dbf1fc5cdbac69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 13 Dec 2009 01:16:27 +0100 Subject: Cocoa: Silence type warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: John Arbuckle Signed-off-by: malc --- cocoa.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cocoa.m') diff --git a/cocoa.m b/cocoa.m index f8c2e00..0a95c77 100644 --- a/cocoa.m +++ b/cocoa.m @@ -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 ); -- cgit v1.1