Skip to content

Commit

Permalink
struct ifmediareq *ifmrp is only used in the COMPAT_FREEBSD32 parts of
Browse files Browse the repository at this point in the history
ifioctl().  Move it inside the proper #ifdef.  This was throwing a valid
"Assigned but unused" warning with gcc.

Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D16063
  • Loading branch information
seanbruno committed Jul 7, 2018
1 parent 5f1347d commit 2da1967
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sys/net/if.c
Original file line number Diff line number Diff line change
Expand Up @@ -2969,8 +2969,8 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct thread *td)
#ifdef COMPAT_FREEBSD32
caddr_t saved_data = NULL;
struct ifmediareq ifmr;
#endif
struct ifmediareq *ifmrp;
#endif
struct ifnet *ifp;
struct ifreq *ifr;
int error;
Expand Down Expand Up @@ -3016,8 +3016,8 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct thread *td)
#endif
}

ifmrp = NULL;
#ifdef COMPAT_FREEBSD32
ifmrp = NULL;
switch (cmd) {
case SIOCGIFMEDIA32:
case SIOCGIFXMEDIA32:
Expand Down

0 comments on commit 2da1967

Please sign in to comment.