From patchwork Wed Jan 6 22:47:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [v2,RESEND,04/11] Cocoa: Silence type warning Date: Wed, 06 Jan 2010 12:47:10 -0000 From: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 42358 Message-Id: <1262818037-926-5-git-send-email-andreas.faerber@web.de> To: qemu-devel@nongnu.org Cc: John Arbuckle , =?UTF-8?q?Andreas=20F=C3=A4rber?= 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 --- cocoa.m | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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 );