Re: [libvirt] [PATCH 4/9] virutil: Resolve Coverity RESOURCE_LEAK

2014-09-11 Thread Eric Blake
[adding gnulib, in case anyone else runs into the same false positive] On 09/11/2014 06:06 PM, John Ferlan wrote: > This ends up being a very bizarre false positive. With an assist from > eblake, the claim is that mgetgroups() could return a -1 value, but yet > still have a groups buffer allocated

Re: Compiler Warning vasnprintf.c (L5107: comparison between signed and unsigned int)

2014-09-11 Thread Eric Blake
On 09/11/2014 02:20 PM, Paul Eggert wrote: > On 09/11/2014 01:05 PM, Дилян Палаузов wrote: >> vasnprintf.c: In function ‘vasnprintf’: >> vasnprintf.c:5107:35: warning: comparison between signed and unsigned >> integer expressions [-Wsign-compare] >> if (count < maxlen >>

Re: Compiler Warning vasnprintf.c (L5107: comparison between signed and unsigned int)

2014-09-11 Thread Paul Eggert
On 09/11/2014 01:05 PM, Дилян Палаузов wrote: vasnprintf.c: In function ‘vasnprintf’: vasnprintf.c:5107:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (count < maxlen ^ count is int (signed

Compiler Warning vasnprintf.c (L5107: comparison between signed and unsigned int)

2014-09-11 Thread Дилян Палаузов
Hello, I compile with gcc491 -Wall -Wextra vasnprintf.c: In function ‘vasnprintf’: vasnprintf.c:5107:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (count < maxlen ^ count is int (signed)

Re: Portable printing of 'size_t' (especially with mingw for windows)

2014-09-11 Thread Pádraig Brady
On 09/11/2014 07:20 PM, Assaf Gordon wrote: > > On 09/11/2014 11:48 AM, Pádraig Brady wrote: >>> >>> I wonder if there's a definition in "inttypes.h" or similar that would be a >>> correct one to use, >>> or if there's another portable way to compile it. >> >> I've some notes on printing int valu

Re: Portable printing of 'size_t' (especially with mingw for windows)

2014-09-11 Thread Assaf Gordon
On 09/11/2014 11:48 AM, Pádraig Brady wrote: I wonder if there's a definition in "inttypes.h" or similar that would be a correct one to use, or if there's another portable way to compile it. I've some notes on printing int values at: http://www.pixelbeat.org/programming/gcc/int_types/ That

Re: [PATCH] poll: wait until timeout on pipes (win32)

2014-09-11 Thread Edward Thomson
On Thu, Sep 11, 2014 at 07:51:59PM +0300, Eli Zaretskii wrote: > Maybe if you import the select module from gnulib, in addition to > poll, the problem will be solved? I don't know. My understanding was that gnulib would not try to replace existing functions. Is there a way to build the gnulib te

Re: [PATCH] poll: wait until timeout on pipes (win32)

2014-09-11 Thread Eli Zaretskii
> Date: Thu, 11 Sep 2014 16:24:53 + > From: Edward Thomson > Cc: bug-gnulib@gnu.org > > On Thu, Sep 11, 2014 at 06:18:19PM +0300, Eli Zaretskii wrote: > > > > Are you using the latest gnulib? A similar problem in 'socket' was > > fixed about 3 months ago (see commit aaaf546); since 'poll' c

Re: [PATCH] poll: wait until timeout on pipes (win32)

2014-09-11 Thread Edward Thomson
On Thu, Sep 11, 2014 at 06:18:19PM +0300, Eli Zaretskii wrote: > > Are you using the latest gnulib? A similar problem in 'socket' was > fixed about 3 months ago (see commit aaaf546); since 'poll' calls > 'select', perhaps that fix also solves your problems in 'poll'? I'm afraid it does not; we u

Re: Portable printing of 'size_t' (especially with mingw for windows)

2014-09-11 Thread Pádraig Brady
On 09/11/2014 04:28 PM, Assaf Gordon wrote: > Hello, > > I'm not sure if this is a gnulib question per-se, but I'm hopeful you could > perhaps advise me. > > I use the following (or similar) code in my project: > > size_t line=42; > error(EXIT_FAILURE, 0, _("error in line %zu"), line);

Re: Portable printing of 'size_t' (especially with mingw for windows)

2014-09-11 Thread Eric Blake
On 09/11/2014 09:28 AM, Assaf Gordon wrote: > Hello, > > I'm not sure if this is a gnulib question per-se, but I'm hopeful you > could perhaps advise me. gnulib has overrides for the various printf() family of functions, which correctly parse %zu on mingw. But pulling those in can be rather heav

Portable printing of 'size_t' (especially with mingw for windows)

2014-09-11 Thread Assaf Gordon
Hello, I'm not sure if this is a gnulib question per-se, but I'm hopeful you could perhaps advise me. I use the following (or similar) code in my project: size_t line=42; error(EXIT_FAILURE, 0, _("error in line %zu"), line); The "%zu" works for 'size_t' on all unix-like systems I've t

Re: [PATCH] poll: wait until timeout on pipes (win32)

2014-09-11 Thread Eli Zaretskii
> Date: Wed, 10 Sep 2014 22:17:28 + > From: Edward Thomson > > I'm very interested in seeing the poll(2) compatibility function wait > until the timeout has elapsed before returning on win32. The manual > indicates that "under Windows, when passing a pipe, Gnulib's poll > replacement might r

Re: fcntl.h allows inclusion of sys/stat.h in an illegal way

2014-09-11 Thread Pádraig Brady
On 09/11/2014 12:28 PM, Johannes Zarl wrote: > Hi, > > fcntl.h as supplied on many glibc systems includes sys/stat.h in an extern > "C" > linkage block. Together with the use of namespaces in gnulib sys/stat.h this > results in illegal (as in against the standard) C++ code. > > Older gcc versi

fcntl.h allows inclusion of sys/stat.h in an illegal way

2014-09-11 Thread Johannes Zarl
Hi, fcntl.h as supplied on many glibc systems includes sys/stat.h in an extern "C" linkage block. Together with the use of namespaces in gnulib sys/stat.h this results in illegal (as in against the standard) C++ code. Older gcc versions seem to have diagnosed this correctly, as there is a work