[libvirt] BSD gcrypt warnings [was: [PATCH] build: mark conditionally unused variables]

Roman Bogorodskiy bogorodskiy at gmail.com
Fri May 3 03:32:28 UTC 2013


  Eric Blake wrote:

> On 05/02/2013 06:38 AM, Roman Bogorodskiy wrote:
> >   Eric Blake wrote:
> > 
> >> These fixes solve a compilation failure on FreeBSD:
> >>
> >> util/virnetdevtap.c: In function 'virNetDevTapGetName':
> >> util/virnetdevtap.c:56: warning: unused parameter 'tapfd' [-Wunused-parameter]
> >> util/virnetdevtap.c:56: warning: unused parameter 'ifname' [-Wunused-parameter]
> >>
> >> * src/util/virnetdevtap.c (virNetDevTapGetName): Add attributes
> >> when TUNGETIFF is not present.
> > 
> > Thanks for that fix as well.
> > 
> > Can you actually compile it successfully without '--disable-werror'?
> 
> Looks like I skipped a few files:
> 
> $ ./config.status --version | head -n3
> libvirt config.status 1.0.5
> configured by ./configure, generated by GNU Autoconf 2.68,
>   with options "'-C' 'CFLAGS=-g' '--without-network'"
> 
> Maybe I should try again and see how omitting --without-network fares.
> 
> > 
> > It fails for me because of gcrypt.h:
> > 
> > http://people.freebsd.org/~novel/misc/libvirt_gcrypt_warns.txt
> 
> 
>   CC       libvirt_driver_la-libvirt.lo
> cc1: warnings being treated as errors
> In file included from libvirt.c:58:
> /usr/local/include/gcrypt.h:1336: warning: 'gcry_ac_io_mode_t' is
> deprecated [-Wdeprecated-declarations]
> /usr/local/include/gcrypt.h:1337: warning: 'gcry_ac_io_type_t' is
> deprecated [-Wdeprecated-declarations]
> ... lots more deprecation warnings
> 
> /usr/local often implies a self-built gcrypt; but then I just noticed
> that my BSD VM has that file as well (I guess that's what you get when
> using BSD ports) - what version are you using?  And what version of gcc,
> so that we can figure out how to disable deprecation warnings from
> system headers?  For that matter, what is in your file around line 1336,
> since my copy of the file was not producing deprecation warnings for me,
> and does not contain 'gcry_ac_io_mode_t' near line 1336.

Indeed, FreeBSD ports install things to /usr/local by default.

I'm using gcrypt 1.5.0.

Relevant part of gcrypt.h:

1333 typedef struct gcry_ac_io
1334 {
1335   /* This is an INTERNAL structure, do NOT use manually.  */
1336   gcry_ac_io_mode_t mode _GCRY_ATTR_INTERNAL;
1337   gcry_ac_io_type_t type _GCRY_ATTR_INTERNAL;
1338   union
....

gcc version 4.2.1 20070831 patched [FreeBSD]


Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130503/f8479e14/attachment-0001.sig>


More information about the libvir-list mailing list