Remove dead code: #if 0 blocks and commented-out statements - #498
Merged
Conversation
All #if 0 code that has been disabled for years goes away: the sig_ask interactive signal handlers, check_rate, HTS_TOTAL_RECV_CHECK, the make_empty_index no-op body (function removed with its only call site), the htscharset sample main(), the dead FTP CWD sequence, and assorted disabled fragments in the parser and engine. Blocks with a live #else keep that branch. The htsweb.c DEBUG toggle stays: its #else arm is the live definition and the macro is used. The htsparse.c 3.43 note about not post-excluding authorized links is kept as a plain comment; commented-out declarations and calls that only served the removed blocks go with them. French comments rewrapped by the formatter were translated in passing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
Sweep of ~650 lines of //-disabled statements, declarations, and calls (plus three /*-wrapped dead blocks in htscoremain.c and htscore.c and the MFC pApp remnant in htsserver.c). Prose comments stay, including labels that describe live code; usage examples and config-knob docs (HTS_TRACE_MALLOC, the htsweb.c DEBUG toggle) were kept. Insertions are clang-format rewraps of live lines that became touched by the deletions. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes all 33
#if 0blocks and roughly 650 lines of commented-out statements, declarations and calls. Blocks with a live#elsekeep that branch, and thehtsweb.cDEBUG toggle stays since its#elsearm is the active definition. Dead satellites go with the blocks: thesig_askinteractive signal handlers,check_rate,HTS_TOTAL_RECV_CHECK, the no-opmake_empty_index, and the prototypes and commented declarations that only served them.Comments that document live code stay (usage examples, config-knob docs like
HTS_TRACE_MALLOC), and the 3.43 warning against post-excluding authorized links is now a plain comment. No behavior change:make checkpasses, and the insertions in the diff are clang-format rewraps of live lines the deletions touched.