|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 4/8] tools/xenalyze: Mark unreachable code as unreachable
Ian Campbell writes ("Re: [Xen-devel] [PATCH 4/8] tools/xenalyze: Mark
unreachable code as unreachable"):
> On Thu, 2016-02-25 at 15:43 +0000, George Dunlap wrote:
> > Right -- well basically error(ASSERT,...) is a custom abort(). But in
> > the current case it isn't actually doing anything more than an abort()
> > would, so perhaps I should use that instead (since coverity knows about
> > abort() and assert() but not my custom function).
>
> Personally this is what I would do in this case.
Indeed. I would replace the fprintf/error with
assert(!"logic hole in this function");
This is a standard idiom for `abort()' when you don't like to just
call abort because it doesn't produce a message.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |