Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Apr 2013 08:37:00 -0600
From:      "Kenneth D. Merry" <ken@freebsd.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r249658 - in head: bin/chio sys/cam/scsi sys/sys
Message-ID:  <20130420143700.GA44286@nargothrond.kdm.org>
In-Reply-To: <82451AEC-79FD-448F-B180-C2CEC47EB18B@bsdimp.com>
References:  <201304192003.r3JK3qFB013463@svn.freebsd.org> <82451AEC-79FD-448F-B180-C2CEC47EB18B@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130420143700.GA44286>