This kind of warning (used with -Werror) breaks all sysutils/xentools*
builds with gcc >= 7.
I started fixing some for xentools48, but ran out of time and gave up
on xen instead.
Martin
$NetBSD$
Elide string truncation warning with newer gcc.
--- tools/xenpmd/xenpmd.c.orig 2018-01-23
Date:Mon, 18 Mar 2019 11:30:49 +1100
From:matthew green
Message-ID: <29602.1552869...@splode.eterna.com.au>
| Martin Husemann writes:
| > IMO the most stupid warning ever added to gcc. I would just disable it for
| > newer gcc.
|
| i don't agree. some
On Mon, Mar 18, 2019 at 11:30:49AM +1100, matthew green wrote:
> Martin Husemann writes:
> > IMO the most stupid warning ever added to gcc. I would just disable it for
> > newer gcc.
>
> i don't agree. some times it is very difficult to avoid and
> it sometimes misdiagnoses the problem but it
Martin Husemann writes:
> On Sat, Mar 16, 2019 at 10:18:48AM +, Chavdar Ivanov wrote:
> > xenpmd.c: In function 'get_next_battery_file':
> > xenpmd.c:90:36: error: '%s' directive output may be truncated writing
> > up to 511 bytes into a region of size 271 [-Werror=format-truncation=]
> >
xentools411 builds fine now. Next I might try it with the new ocaml from wip.
On Sat, 16 Mar 2019 at 16:39, Manuel Bouyer wrote:
>
> On Sat, Mar 16, 2019 at 04:43:43PM +0200, Andreas Gustafsson wrote:
> > Martin Husemann wrote:
> > > IMO the most stupid warning ever added to gcc. I would just
On Sat, Mar 16, 2019 at 04:43:43PM +0200, Andreas Gustafsson wrote:
> Martin Husemann wrote:
> > IMO the most stupid warning ever added to gcc. I would just disable it for
> > newer gcc.
>
> Be that as it may, gutteridge@ already fixed the xentools411 issue by
> adding
Martin Husemann wrote:
> IMO the most stupid warning ever added to gcc. I would just disable it for
> newer gcc.
Be that as it may, gutteridge@ already fixed the xentools411 issue by
adding xentools411/patches/patch-tools_xenpmd_xenpmd.c on Feb 25.
Perhaps Chavdar's problem has something to do
On Sat, Mar 16, 2019 at 10:18:48AM +, Chavdar Ivanov wrote:
> xenpmd.c: In function 'get_next_battery_file':
> xenpmd.c:90:36: error: '%s' directive output may be truncated writing
> up to 511 bytes into a region of size 271 [-Werror=format-truncation=]
> #define BATTERY_INFO_FILE_PATH
Hi,
On today's -current amd64:
gmake[2]: Entering directory
'/usr/pkgsrc/sysutils/xentools411/work/xen-4.11.1/tools'
/usr/pkg/bin/gmake -C xenpmd all
gmake[3]: Entering directory
'/usr/pkgsrc/sysutils/xentools411/work/xen-4.11.1/tools/xenpmd'
gcc -I/usr/pkg/include -I/usr/include