svn commit: r249658 - in head: bin/chio sys/cam/scsi sys/sys
Kenneth D. Merry
ken at freebsd.org
Sat Apr 20 14:37:04 UTC 2013
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 at FreeBSD.ORG
More information about the svn-src-head
mailing list