On Tuesday, April 17, 2012 4:24:38 pm Dimitry Andric wrote:
> On 2012-04-02 13:52, John Baldwin wrote:
> ...
> >> It seems the for loop walks the list until the end, then tacks 'sc' onto
> >> it.
> >>
> >> So to 'fix' the warning, and make the meaning more explicit, we should
> >> probably rewrite that fragment as:
> >>
> >>           LIST_INIT(&(sc->ha_ccb));
> >>           /* Link us into the HA list */
> >>           for (ha =&Asr_softc_list; *ha; ha =&((*ha)->ha_next))
> >>            ;
> >>    *(ha) = sc;
> >>
> >> Is this OK?
> >
> > Can we just make that code use a STAILQ() instead of doing it obscurely by
> > hand?
> 
> That would be a more invasive change, and since this driver is
> essentially unmaintained, I'd like to change as little as possible. :)
> 
> Another solution is to just silence the warning for this driver.

http://www.FreeBSD.org/~jhb/patches/asr_stailq.patch

-- 
John Baldwin
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to