Skip to content

Commit

Permalink
cocoa: Fix warnings about invalid prototype declarations
Browse files Browse the repository at this point in the history
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é <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Message-Id: <[email protected]>
  • Loading branch information
philmd committed Jun 13, 2023
1 parent 7f750ef commit f975033
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/vmnet-bridged.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ui/cocoa.m
Original file line number Diff line number Diff line change
Expand Up @@ -1934,7 +1934,7 @@ static void cocoa_clipboard_request(QemuClipboardInfo *info,
exit(status);
}

static int cocoa_main()
static int cocoa_main(void)
{
QemuThread thread;

Expand Down

0 comments on commit f975033

Please sign in to comment.