qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cocoa: Fix warnings about invalid prototype declarations
@ 2023-04-25 19:28 Philippe Mathieu-Daudé
  2023-04-26  5:18 ` Akihiko Odaki
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-04-25 19:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: Philippe Mathieu-Daudé, Akihiko Odaki, Gerd Hoffmann,
	Marc-André Lureau, Peter Maydell, Jason Wang

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>
---
 net/vmnet-bridged.m | 2 +-
 ui/cocoa.m          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/vmnet-bridged.m b/net/vmnet-bridged.m
index 46d2282863..76a28abe79 100644
--- a/net/vmnet-bridged.m
+++ b/net/vmnet-bridged.m
@@ -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;
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 168170a8a6..0c2153d17c 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -1934,7 +1934,7 @@ static void cocoa_clipboard_request(QemuClipboardInfo *info,
     exit(status);
 }
 
-static int cocoa_main()
+static int cocoa_main(void)
 {
     QemuThread thread;
 
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cocoa: Fix warnings about invalid prototype declarations
  2023-04-25 19:28 [PATCH] cocoa: Fix warnings about invalid prototype declarations Philippe Mathieu-Daudé
@ 2023-04-26  5:18 ` Akihiko Odaki
  0 siblings, 0 replies; 2+ messages in thread
From: Akihiko Odaki @ 2023-04-26  5:18 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Gerd Hoffmann, Marc-André Lureau, Peter Maydell, Jason Wang

On 2023/04/26 4:28, Philippe Mathieu-Daudé wrote:
> 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>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-26  5:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-25 19:28 [PATCH] cocoa: Fix warnings about invalid prototype declarations Philippe Mathieu-Daudé
2023-04-26  5:18 ` Akihiko Odaki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).