cocoa: Fix warnings about invalid prototype declarations
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Sun, 23 Apr 2023 16:55:28 +0000 (18:55 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 13 Jun 2023 09:28:58 +0000 (11:28 +0200)
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

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20230425192820.34063-1-philmd@linaro.org>

net/vmnet-bridged.m
ui/cocoa.m

index 46d22828632b268022383c6da0ba0a5da5fab217..76a28abe793c29d2d3554dcaccecad89855937da 100644 (file)
@@ -37,7 +37,7 @@ done:
 }
 
 
-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;
index 168170a8a68abf29ec23df487673e7635fb97ed5..0c2153d17c285e05509424eb8c9e7c66e37464b7 100644 (file)
@@ -1934,7 +1934,7 @@ static void *call_qemu_main(void *opaque)
     exit(status);
 }
 
-static int cocoa_main()
+static int cocoa_main(void)
 {
     QemuThread thread;