From owner-svn-src-all@FreeBSD.ORG Sat Apr 20 14:37:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 81D48BBC; Sat, 20 Apr 2013 14:37:04 +0000 (UTC) (envelope-from ken@kdm.org) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) by mx1.freebsd.org (Postfix) with ESMTP id 396E41F71; Sat, 20 Apr 2013 14:37:03 +0000 (UTC) Received: from nargothrond.kdm.org (localhost [127.0.0.1]) by nargothrond.kdm.org (8.14.2/8.14.2) with ESMTP id r3KEb0eh044335; Sat, 20 Apr 2013 08:37:00 -0600 (MDT) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.14.2/8.14.2/Submit) id r3KEb0AV044334; Sat, 20 Apr 2013 08:37:00 -0600 (MDT) (envelope-from ken) Date: Sat, 20 Apr 2013 08:37:00 -0600 From: "Kenneth D. Merry" To: Warner Losh Subject: Re: svn commit: r249658 - in head: bin/chio sys/cam/scsi sys/sys Message-ID: <20130420143700.GA44286@nargothrond.kdm.org> References: <201304192003.r3JK3qFB013463@svn.freebsd.org> <82451AEC-79FD-448F-B180-C2CEC47EB18B@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <82451AEC-79FD-448F-B180-C2CEC47EB18B@bsdimp.com> User-Agent: Mutt/1.4.2i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Apr 2013 14:37:04 -0000 On Sat, Apr 20, 2013 at 05:45:43 -0600, Warner Losh wrote: > Hey Ken, > > this change doesn't compile for me. See below > > Warner > > On Apr 19, 2013, at 2:03 PM, Kenneth D. Merry wrote: [ ...] > > + ces->ces_designator_length = devid->designator_length; > > + /* > > + * Make sure we are always NUL terminated. The > > + * buffer should be sized for the maximum > > + * designator length plus 1, but this will make sure > > + * there is always a NUL at the end. This won't > > + * matter for the binary code set, since the user > > + * will only pay attention to the length field. > > + */ > > + ces->ces_designator[ > > + MIN(sizeof(ces->ces_designator) - 1, > > + devid->designator_length)]= '\0'; > > compiler complains here that this comparison is always false due to data ranges. I hacked it in my copy by always using devid->designator_length, but I know that's a lame fix. Can you look into it? > Not sure what happened there. Different warns levels on different architectures? In any case, I put in the same fix you did until I can figure out a better way to do it. (Hard to type with a toddler on your lap. :) Ken -- Kenneth Merry ken@FreeBSD.ORG