]> xenbits.xensource.com Git - libvirt.git/commitdiff
build: mark conditionally unused variables
authorEric Blake <eblake@redhat.com>
Tue, 30 Apr 2013 14:21:26 +0000 (08:21 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 30 Apr 2013 14:21:26 +0000 (08:21 -0600)
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.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/util/virnetdevtap.c

index fac95ecfff2b6e807d1965e7cafdc016f38d09a5..7d77f819fd4c61d49ba96e245a81468609e46b89 100644 (file)
@@ -53,7 +53,7 @@
  * Returns 0 if the interface name is successfully queried, -1 otherwise
  */
 int
-virNetDevTapGetName(int tapfd, char **ifname)
+virNetDevTapGetName(int tapfd ATTRIBUTE_UNUSED, char **ifname ATTRIBUTE_UNUSED)
 {
 #ifdef TUNGETIFF
     struct ifreq ifr;