tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Dead code: double return



On Aug 18,  5:01pm, plunky%ogmig.net@localhost (Iain Hibbert) wrote:
-- Subject: Re: Dead code: double return

| On Mon, 18 Aug 2014, Christos Zoulas wrote:
| 
| > In article <53F1C72D.9070900%M00nBSD.net@localhost>,
| > Maxime Villard  <max%M00nBSD.net@localhost> wrote:
| > >Also, I get several
| > >
| > >   panic(XX);
| > >   return;/break;/continue;
| > >
| > >in many places; it's ok if I start removing these return;/break;/continue;?
| >
| > I'd fix them. But wait for couple more people to chime in.
| 
| for the non returning functions with code after, I'd say that all the
| compilers currently known to be able to used with NetBSD should handle it
| without complaint, since the __dead keyword is understood. However, lint
| does not understand attributes..

Lint does now have code for parsing attributes and some are even implemented.
Compilers should warn about dead code, after dead functions but some don't :-)

christos


Home | Main Index | Thread Index | Old Index