penguin42,
@penguin42@mastodon.org.uk avatar

I've just posted a pretty long request for thoughts on dead code hunting in - all thoughts welcome;
https://lore.kernel.org/lkml/Zjy82Ja6G2iIHl75@gallifrey/T/#u

andyc,
@andyc@mastodon.org.uk avatar

@penguin42 I am absolutely staggered that there are no lint or validation tools that could identify dead code paths and unused variables.

Even worse, the fact that such checks are not a pre-req for a Linux kernel release.

I am pretty sure 'gcc -Wall' did so.

penguin42,
@penguin42@mastodon.org.uk avatar

@andyc Neither gcc or clang warn on at least some of the ones I'm finding; while they'll complain about an unused variable, they won't complain about an unused struct definition; there are also some cases where it won't complain about unused static's - in the weird way I tripped over. People do run lots of scanning tools - and one thing I'm hoping from this mail is if someone comes along and says 'Oh yeh, we could add a check to ....'

penguin42,
@penguin42@mastodon.org.uk avatar

@andyc I've just posted a gcc bug request for one of the cases; I have sympathy it's not so much a bug as such since the value is kind of used:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115027

dick_turpin,
@dick_turpin@mastodon.org.uk avatar

@penguin42 All thoughts?

Never wee next to an electric fence. 🙂

penguin42,
@penguin42@mastodon.org.uk avatar

@dick_turpin I was hoping for less painful thoughts.

dick_turpin,
@dick_turpin@mastodon.org.uk avatar

@penguin42 I'm surprised you didn't reply "More intelligent thoughts"?

penguin42,
@penguin42@mastodon.org.uk avatar

@dick_turpin Well I wasn't going to expect them from you was I?

dick_turpin,
@dick_turpin@mastodon.org.uk avatar

@penguin42 TaDa!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux
  • InstantRegret
  • DreamBathrooms
  • ngwrru68w68
  • osvaldo12
  • cubers
  • magazineikmin
  • ethstaker
  • Youngstown
  • rosin
  • slotface
  • everett
  • kavyap
  • Durango
  • khanakhh
  • megavids
  • thenastyranch
  • anitta
  • modclub
  • GTA5RPClips
  • mdbf
  • cisconetworking
  • tester
  • tacticalgear
  • provamag3
  • Leos
  • normalnudes
  • JUstTest
  • lostlight
  • All magazines