Skip to contentSkip to conversation

cocoa: Fix warnings about invalid prototype declarations

PATCH In review Philippe Mathieu-Daudé 2 participants 2 messages Apr 25, 2023 – Apr 26, 2023 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cocoa: Fix warnings about invalid prototype declarations

Fix the following Cocoa trivial warnings:

C compiler for the host machine: cc (clang 14.0.0 "Apple clang version 14.0.0 (clang-1400.0.29.202)") Objective-C compiler for the host machine: clang (clang 14.0.0)

[100/334] Compiling Objective-C object libcommon.fa.p/net_vmnet-bridged.m.o
net/vmnet-bridged.m:40:31: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] static char* get_valid_ifnames()

                                ^
                                 void
  [742/1436] Compiling Objective-C object libcommon.fa.p/ui_cocoa.m.o
  ui/cocoa.m:1937:22: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
  static int cocoa_main()
                       ^
                        void
---
 net/vmnet-bridged.m | 2 +-
 ui/cocoa.m          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
net/vmnet-bridged.m +1 -1
index 46d2282863..76a28abe79 100644
@@ -37,7 +37,7 @@ static bool validate_ifname(const char *ifname)
 }
 
 
-static char* get_valid_ifnames()
+static char* get_valid_ifnames(void)
 {
     xpc_object_t shared_if_list = vmnet_copy_shared_interface_list();
     __block char *if_list = NULL;
ui/cocoa.m +1 -1
index 168170a8a6..0c2153d17c 100644
@@ -1934,7 +1934,7 @@ static void cocoa_clipboard_request(QemuClipboardInfo *info,
     exit(status);
 }
 
-static int cocoa_main()
+static int cocoa_main(void)
 {
     QemuThread thread;
 
Signature · 1 line
2.38.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Philippe Mathieu-Daudé

Fix the following Cocoa trivial warnings:

C compiler for the host machine: cc (clang 14.0.0 "Apple clang version 14.0.0 (clang-1400.0.29.202)") Objective-C compiler for the host machine: clang (clang 14.0.0)

[100/334] Compiling Objective-C object libcommon.fa.p/net_vmnet-bridged.m.o
net/vmnet-bridged.m:40:31: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] static char* get_valid_ifnames()

Quoted 8 lines
                                 ^
                                  void
   [742/1436] Compiling Objective-C object libcommon.fa.p/ui_cocoa.m.o
   ui/cocoa.m:1937:22: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
   static int cocoa_main()
                        ^
                         void >