mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-06 10:35:20 +00:00
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>
This commit is contained in:
parent
04afa4a88c
commit
fd10a04ef1
2
cocoa.m
2
cocoa.m
@ -791,7 +791,7 @@ static int cocoa_keycode_to_qemu(int keycode)
|
|||||||
if(returnCode == NSCancelButton) {
|
if(returnCode == NSCancelButton) {
|
||||||
exit(0);
|
exit(0);
|
||||||
} else if(returnCode == NSOKButton) {
|
} else if(returnCode == NSOKButton) {
|
||||||
char *bin = "qemu";
|
const char *bin = "qemu";
|
||||||
char *img = (char*)[ [ sheet filename ] cStringUsingEncoding:NSASCIIStringEncoding];
|
char *img = (char*)[ [ sheet filename ] cStringUsingEncoding:NSASCIIStringEncoding];
|
||||||
|
|
||||||
char **argv = (char**)malloc( sizeof(char*)*3 );
|
char **argv = (char**)malloc( sizeof(char*)*3 );
|
||||||
|
Loading…
Reference in New Issue
Block a user