mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 06:35:24 +00:00
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 <eblake@redhat.com>
This commit is contained in:
parent
ce284bb56d
commit
b376dea91f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user