Bug Spotlight : What the heck is DEAD_STORE and why should I care?

MuseDev
Musings
Published in
Jan 19, 2021

A dead_store is when a value is written but never read or used by the rest of the program. Many developers think of dead stores as style issues, or at most “about good hygiene.” But actually, they can consume memory, and can also identify error codes that aren’t being checked when they should.

The Dead Store issue below shows a return value being captured but not checked. This particular return value represents an error code and so an error condition is not being handled.

Have a nasty bug you want us to look into? Send a tip to hello@muse.dev and our bug catchers will write up a report.

--

--

Musings
Musings

Published in Musings

Check out our ever-growing round up of industry updates, best practices for code analysis, and DevOps Transformations.