From owner-freebsd-net@FreeBSD.ORG Wed Jan 6 11:20:02 2010 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AFAF106566B for ; Wed, 6 Jan 2010 11:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 752B78FC1D for ; Wed, 6 Jan 2010 11:20:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o06BK2lG082939 for ; Wed, 6 Jan 2010 11:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o06BK22H082938; Wed, 6 Jan 2010 11:20:02 GMT (envelope-from gnats) Date: Wed, 6 Jan 2010 11:20:02 GMT Message-Id: <201001061120.o06BK22H082938@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Paul B Mahol Cc: Subject: Re: kern/142197: [ndis] [patch] ndis is missing media status reporting X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul B Mahol List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 11:20:02 -0000 The following reply was made to PR kern/142197; it has been noted by GNATS. From: Paul B Mahol To: Roman Bogorodskiy Cc: bug-followup@freebsd.org, rpaulo@freebsd.org Subject: Re: kern/142197: [ndis] [patch] ndis is missing media status reporting Date: Wed, 6 Jan 2010 11:54:48 +0100 On 1/6/10, Roman Bogorodskiy wrote: > Hello, > > Seems like there's a minor problem with that: > > cc1: warnings being treated as errors > /usr/src/sys/modules/if_ndis/../../dev/if_ndis/if_ndis.c: In function > 'ndis_media_status': > /usr/src/sys/modules/if_ndis/../../dev/if_ndis/if_ndis.c:2252: warning: > passing argument 4 of 'ndis_get_info' from incompatible pointer type > *** Error code 1 > > As ndis_get_info accepts 'int', not 'size_t', so after applying this: > > --- if_ndis.c.orig 2010-01-06 12:15:17.000000000 +0300 > +++ if_ndis.c 2010-01-06 12:17:03.000000000 +0300 > @@ -2243,7 +2243,7 @@ > struct ieee80211vap *vap = ifp->if_softc; > struct ndis_softc *sc = vap->iv_ic->ic_ifp->if_softc; > uint32_t txrate; > - size_t len; > + int len; > > if (!NDIS_INITIALIZED(sc)) > return; > > it compiles fine. > > Roman Bogorodskiy > Right, I generated patch from my git repo which is less broken then code in CURRENT. ndis_get_info should really use size_t and not int for *buflen -- Paul B Mahol