[libvirt] [PATCH] build: fix building with '--enable-test-locking'

Martin Kletzander mkletzan at redhat.com
Wed Dec 18 15:56:01 UTC 2013


On Wed, Dec 18, 2013 at 06:34:43AM -0700, Eric Blake wrote:
> On 12/18/2013 06:25 AM, Martin Kletzander wrote:
>
> >>> pipefd[bool] fail (obviously).  Forcing the subscript to be bool by
> >>> double negation fixes the build breaker.
> >>
> >> I don't get how this could possibly make a difference.  The 'output'
> >> variable is declared bool, and then only ever assigned 'false' or
> >> 'true', which if bool is replaced by gnulib are still guaranteed to be 0
> >> and 1, so using it directly as an array index is still safe.
> >>
> >
> > But the thing is that due to -Dbool=char the variable is declared
> > char, not bool.
>
> But if the variable contains exactly 0 or 1, it still makes no
> difference as an array index whether it was typed bool or char.
>

Yep, but '--enable-werror' is sad aboot it.  Anyways, the code for
test-locking is way too old and I don't need it in for anything right
now, so I'm ok with keeping everything as-is.  Thanks for having a
look at it and sorry for wasting your time.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131218/9967a806/attachment-0001.sig>


More information about the libvir-list mailing list