qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, "Sebastian Wilhelmi" <wilhelmi@google.com>,
	"Eric Blake" <eblake@redhat.com>,
	"Sebastian Wilhelmi" <seppi@seppi.de>,
	"Simon Wörner" <contact@simon-woerner.de>
Subject: Re: [PATCH-for-8.0] qemu/osdep.h: Do not declare function prototypes using extern keyword
Date: Mon, 20 Mar 2023 14:47:22 +0100	[thread overview]
Message-ID: <42cc3cee-b148-aab0-cfd5-a684ce55d7f6@linaro.org> (raw)
In-Reply-To: <ZBhfRmJc0M93s1F5@redhat.com>

On 20/3/23 14:27, Daniel P. Berrangé wrote:
> 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

Not the same patch. I'll rebase and post for 8.1 then I guess :)

>> 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



  reply	other threads:[~2023-03-20 13:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 13:14 [PATCH-for-8.0] qemu/osdep.h: Do not declare function prototypes using extern keyword Philippe Mathieu-Daudé
2023-03-20 13:27 ` Daniel P. Berrangé
2023-03-20 13:47   ` Philippe Mathieu-Daudé [this message]
2023-03-20 14:04     ` Thomas Huth
2023-03-20 14:24       ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42cc3cee-b148-aab0-cfd5-a684ce55d7f6@linaro.org \
    --to=philmd@linaro.org \
    --cc=berrange@redhat.com \
    --cc=contact@simon-woerner.de \
    --cc=eblake@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seppi@seppi.de \
    --cc=thuth@redhat.com \
    --cc=wilhelmi@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).