From b376dea91ffa731587f9b229a61cd43ded10862c Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 30 Apr 2013 08:21:26 -0600 Subject: [PATCH] build: mark conditionally unused variables 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 --- src/util/virnetdevtap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index fac95ecfff..7d77f819fd 100644 --- a/src/util/virnetdevtap.c +++ b/src/util/virnetdevtap.c @@ -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;