From: Adrian Bunk <bunk@stusta.de>
To: Khem Raj <raj.khem@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/2] systemd: Fix build with gcc9
Date: Mon, 6 May 2019 21:23:39 +0300 [thread overview]
Message-ID: <20190506182339.GA21306@localhost> (raw)
In-Reply-To: <20190506175136.7594-1-raj.khem@gmail.com>
On Mon, May 06, 2019 at 10:51:35AM -0700, Khem Raj wrote:
>...
> +gcc-9 has become a bit stricter and can check all kind of formatted
> +input/output functions which causes additional warnings when compiling
> +networkd
> +
> +/src/basic/log.h:104:9: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
> + log_internal_realm(LOG_REALM_PLUS_LEVEL(LOG_REALM, (level)), __VA_ARGS__)
>...
> + if (r < 0)
> + log_link_warning_errno(link, r, "Cannot %s IPv6 for interface %s: %m",
> +- enable_disable(!disabled), link->ifname);
> ++ enable_disable(!disabled),
> ++ (link->ifname) ? link->ifname : "<null>");
>...
The fix doesn't look correct to me:
gcc says it "is null", so checking whether or not it is null doesn't
match the error message.
If it is a compiler bug as was at some point mentioned upstream,
a better temporary workaround would be to stop making this an error
with -Wno-error=format-overflow (untested).
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
next prev parent reply other threads:[~2019-05-06 18:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-06 17:51 [PATCH 1/2] systemd: Fix build with gcc9 Khem Raj
2019-05-06 17:51 ` [PATCH 2/2] gcc-target: Do not set --with-sysroot and gxx-include-dir paths Khem Raj
2019-05-06 18:23 ` Adrian Bunk [this message]
2019-05-13 23:27 ` [PATCH 1/2] systemd: Fix build with gcc9 Burton, Ross
2019-05-14 3:21 ` Khem Raj
2019-05-14 3:56 ` Burton, Ross
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=20190506182339.GA21306@localhost \
--to=bunk@stusta.de \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.