qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH-for-8.0] qemu/osdep.h: Do not declare function prototypes usi


From: Daniel P . Berrangé
Subject: Re: [PATCH-for-8.0] qemu/osdep.h: Do not declare function prototypes using extern keyword
Date: Mon, 20 Mar 2023 13:27:34 +0000
User-agent: Mutt/2.2.9 (2022-11-12)

On Mon, Mar 20, 2023 at 02:14:26PM +0100, Philippe Mathieu-Daudé wrote:
> By default, C function prototypes declared in headers are visible,
> so there is no need to declare them as 'extern' functions. Remove
> this redundancy. This also fixes when building under MSYS2:
> 
>   C:/msys64/mingw64/include/glib-2.0/glib/gmacros.h:1075:21: error: standard 
> attributes in middle of decl-specifiers
>   1075 | # define G_NORETURN [[noreturn]]
>         |                     ^
>   C:/msys64/code/qemu/src/include/qemu/osdep.h:240:8: note: in expansion of 
> macro 'G_NORETURN'
>   240 | extern G_NORETURN
>         |        ^~~~~~~~~~
> 
> Reported-by: Simon Wörner <contact@simon-woerner.de>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1541

There's already a fix for that issue included in a PULL request from
Thomas:

https://lists.gnu.org/archive/html/qemu-devel/2023-03/msg05225.html

> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  include/qemu/osdep.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
> index f68b5d8708..79c26c748a 100644
> --- a/include/qemu/osdep.h
> +++ b/include/qemu/osdep.h
> @@ -237,7 +237,7 @@ extern "C" {
>   * supports QEMU_ERROR, this will be reported at compile time; otherwise
>   * this will be reported at link time due to the missing symbol.
>   */
> -extern G_NORETURN
> +G_NORETURN
>  void QEMU_ERROR("code path is reachable")
>      qemu_build_not_reached_always(void);
>  #if defined(__OPTIMIZE__) && !defined(__NO_INLINE__)
> -- 
> 2.38.1
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]