brandon-rhodes / pyephem

Scientific-grade astronomy routines for Python
Other
783 stars 121 forks source link

Drop unused variable from deep.c #275

Open r-barnes opened 4 months ago

r-barnes commented 4 months ago

Causes -Wunused-but-set-variable to pass

brandon-rhodes commented 4 months ago

@r-barnes — Could you outline your situation; are you working with tools that set that -W flag unilaterally? If so, then we might want to pivot the XEphem build to do the check itself, so that we don't break it again in the future without knowing it.

r-barnes commented 3 months ago

@brandon-rhodes - I am working in a large codebase with a custom build system that applies -Wunused-but-set-variable to allow our code as well as to third-party code.

I don't have numbers handy (though I could generate them), but enabling -Wunused-but-set-variable has helped us identify a lot of dead code and more than a few bugs. If you're interested in enabling the flag, that'd be swell. I'm otherwise just passing fixes upstream as I go.