nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Changing the return type of done()

2007-04-18 01:43:02
Joel Reicher wrote:
I've thought a bit more about this, and am now thinking of changing

return done(status);

to

done(status);
assert(0); /* done() shouldn't have returned */
return 1;

to emphasise that the return should not be reached. What do you think?
Is this overkill?

I'd tend to prefer something like:

  done(status);
  /* NOTREACHED */

(traditionally a comment for lint, but I use it as a note to the reader.)
That tells the reader that done() never returns, and doesn't put in
extra random junk. Placation of the compiler's warnings should be done
with a function attribute.

-- PMM


_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>