提交 fd10a04e 编写于 作者: A Andreas Färber 提交者: malc

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: NAndreas Färber <andreas.faerber@web.de>
Cc: John Arbuckle <programmingkidx@gmail.com>
Signed-off-by: Nmalc <av1474@comtv.ru>
上级 04afa4a8
......@@ -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 );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册