Skip to content

Commit

Permalink
Merge pull request #520 from hannesm/fix-519
Browse files Browse the repository at this point in the history
tenders, FreeBSD, tap: Ignore "up" variable to avoid compiler warning
  • Loading branch information
dinosaure authored Jul 20, 2022
2 parents f6eb867 + 6295f93 commit 2d943a5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tenders/common/tap_attach.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,13 @@ int tap_attach(const char *ifname)

#elif defined(__FreeBSD__)

/*
* Avoid unused-but-set-variable warning on FreeBSD, where the tap device
* is only up once open() was called by the process.
*/
if (!up)
;

char devname[strlen(ifname) + 6];

snprintf(devname, sizeof devname, "/dev/%s", ifname);
Expand Down

0 comments on commit 2d943a5

Please sign in to comment.