From owner-cvs-all@FreeBSD.ORG Fri Nov 3 22:03:47 2006 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 87D3216A403; Fri, 3 Nov 2006 22:03:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3ECDE43D55; Fri, 3 Nov 2006 22:03:36 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kA3M3Umk024822; Fri, 3 Nov 2006 17:03:31 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Randall Stewart Date: Fri, 3 Nov 2006 17:03:28 -0500 User-Agent: KMail/1.9.1 References: <200611031948.kA3JmuZ6072620@repoman.freebsd.org> <454BB06E.40202@cisco.com> <454BB5DC.4030903@cisco.com> In-Reply-To: <454BB5DC.4030903@cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611031703.29182.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Fri, 03 Nov 2006 17:03:31 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2159/Fri Nov 3 12:49:21 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, Doug Barton , src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/netinet sctp_asconf.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Nov 2006 22:03:47 -0000 On Friday 03 November 2006 16:34, Randall Stewart wrote: > /src/sys/netinet/sctp_usrreq.c: In function `sctp_optsset': > /src/sys/netinet/sctp_usrreq.c:3136: warning: cast from pointer to > integer of different size > > > The above one I will have to ask if any one of you can give > me a hand.. I am not a sparcy person ;-) and the line is: > on_off = (mtod(m, int)); > > (on_off is declared as a int on_off; a few lines above it). mtod() returns a pointer. If you want to get an int out of the mbuf data, then maybe something like: on_off = ntohl(*mtod(m, int *))); is what you want. As it is, you are casting m->m_data (char *) to an int and returning the raw value of the data pointer into your int. :) -- John Baldwin