Author: sbruno Date: Sat Jul 7 13:35:06 2018 New Revision: 336062 URL: https://svnweb.freebsd.org/changeset/base/336062
Log: struct ifmediareq *ifmrp is only used in the COMPAT_FREEBSD32 parts of 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 Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sat Jul 7 12:28:16 2018 (r336061) +++ head/sys/net/if.c Sat Jul 7 13:35:06 2018 (r336062) @@ -2969,8 +2969,8 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, s #ifdef COMPAT_FREEBSD32 caddr_t saved_data = NULL; struct ifmediareq ifmr; -#endif struct ifmediareq *ifmrp; +#endif struct ifnet *ifp; struct ifreq *ifr; int error; @@ -3016,8 +3016,8 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, s #endif } - ifmrp = NULL; #ifdef COMPAT_FREEBSD32 + ifmrp = NULL; switch (cmd) { case SIOCGIFMEDIA32: case SIOCGIFXMEDIA32: _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"