On Fri, Dec 2, 2016 at 9:38 PM, Ravi Pokala <rpok...@mac.com> wrote: > -----Original Message----- >> From: <owner-src-committ...@freebsd.org> on behalf of Kyle Evans >> <kevan...@ksu.edu> >> >> I understand that this is a bogus error because at this point it >> pretty much *has* to be set by the report_timestamp call just prior, >> but is there a clean way to trick GCC into agreeing, or is it just a >> matter of explicitly initializing it to 0 before the report_timestamp >> call? > > Actually, it's a valid warning. While all paths to that point in timestamp() > go through report_timestamp(), not all paths through report_timestamp() set > *ts. Specifically, if cam_getccb() or cam_send_ccb() fail, or the request was > not completed, report_timestamp() does 'goto bailout' without setting *ts.
But in that case, report_timestamp() returns a non-zero error. And timestamp() will goto its own bailout, avoiding use of an unset value. > I'm disappointed that `clang' (on i386 and amd64) didn't notice this; I was > under the impression `clang' did more of that type of deep path analysis than > `gcc'. <shrug> I think it's purely spurious, although understandably difficult for the compiler to notice. Adrian's proposed zero initialization seems like a fine fix. Best, Conrad _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"