xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "Jan Beulich" <jbeulich@suse.com>,
	"Jürgen Groß" <jgross@suse.com>, "Julien Grall" <julien@xen.org>
Cc: <raphning@amazon.co.uk>, <iwj@xenproject.org>,
	Julien Grall <jgrall@amazon.com>, Wei Liu <wl@xen.org>,
	<xen-devel@lists.xenproject.org>
Subject: Re: [PATCH for-4.15 2/2] tools/xenstore: Check the format printf for xprintf() and barf{,_perror}()
Date: Fri, 5 Mar 2021 13:48:15 +0000	[thread overview]
Message-ID: <aff16375-9624-04c7-281b-d93fb38a05fa@citrix.com> (raw)
In-Reply-To: <74568cd7-143b-48ad-b9be-bf4229655376@suse.com>

On 05/03/2021 13:45, Jan Beulich wrote:
> On 05.03.2021 14:01, Jürgen Groß wrote:
>> On 05.03.21 13:40, Julien Grall wrote:
>>> From: Julien Grall <jgrall@amazon.com>
>>> --- a/tools/xenstore/utils.h
>>> +++ b/tools/xenstore/utils.h
>>> @@ -29,10 +29,12 @@ const char *dump_state_align(FILE *fp);
>>>   
>>>   #define PRINTF_ATTRIBUTE(a1, a2) __attribute__((format (printf, a1, a2)))
>>>   
>>> -void barf(const char *fmt, ...) __attribute__((noreturn));
>>> -void barf_perror(const char *fmt, ...) __attribute__((noreturn));
>>> +#define __noreturn __attribute__((noreturn))
>>>   
>>> -extern void (*xprintf)(const char *fmt, ...);
>>> +void barf(const char *fmt, ...) __noreturn PRINTF_ATTRIBUTE(1, 2);
>>> +void barf_perror(const char *fmt, ...) __noreturn PRINTF_ATTRIBUTE(1, 2);
>>> +
>>> +extern void (*xprintf)(const char *fmt, ...) PRINTF_ATTRIBUTE(1, 2);
>> ... the extern here would be dropped.
> But this isn't a function declaration, but that of a data object.
> With the extern dropped, a common symbol will appear in every CU.

Correct, and some of the containers in Gitlab CI really ought to notice
because GCC 9(? IIRC) defaulted to -fno-common.

~Andrew


  reply	other threads:[~2021-03-05 13:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 12:40 [PATCH for-4.15 0/2] xenstore: Check format printf Julien Grall
2021-03-05 12:40 ` [PATCH for-4.15 1/2] tools/xenstore: Consolidate PRINTF_ATTRIBUTE() in utils.h Julien Grall
2021-03-05 13:00   ` Jürgen Groß
2021-03-05 13:24   ` Ian Jackson
2021-03-05 12:40 ` [PATCH for-4.15 2/2] tools/xenstore: Check the format printf for xprintf() and barf{,_perror}() Julien Grall
2021-03-05 13:01   ` Jürgen Groß
2021-03-05 13:27     ` Ian Jackson
2021-03-05 13:32       ` Julien Grall
2021-03-05 13:45     ` Jan Beulich
2021-03-05 13:48       ` Andrew Cooper [this message]
2021-03-05 13:48       ` Julien Grall
2021-03-05 13:58         ` Ian Jackson
2021-03-06 19:37           ` Julien Grall
2021-03-08  9:44             ` Ian Jackson
2021-03-11  9:48               ` Julien Grall
2021-03-05 13:24   ` Ian Jackson

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=aff16375-9624-04c7-281b-d93fb38a05fa@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=jgrall@amazon.com \
    --cc=jgross@suse.com \
    --cc=julien@xen.org \
    --cc=raphning@amazon.co.uk \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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).