[FIX] chore: remove two dead includes flagged by clangd - #2329
Conversation
ccx_common_char_encoding.h in ccx_decoders_common.c is unused — the functions it declares moved to ccx_encoders_common.c after a 2014 refactor and the include was never cleaned up. ccx_demuxer_mxf.h in general_loop.c is also unused — general_loop.c handles MXF via ccx_mxf_getmoredata, which is already declared in lib_ccx.h (included separately). This header appears to have been added by reflex alongside MXF support in 2017 without ever being needed. A third flagged include, ffmpeg_intgr.h in general_loop.c, was investigated and left untouched — it's a genuine dependency under Closes CCExtractor#2328
|
Hey @cfsmp3, small cleanup PR whenever you have a sec. Two dead includes, verified, no functional change |
CCExtractor CI platform finished running the test files on linux. 167/237 tests matched the approved output:
70 tests do not match the approved output. That is the pass/fail verdict. Whether this branch caused it is a separate question, answered below.
Compared with the tip of master — test 9499, commit 3af3fc2:
Compared with the commit this branch was cut from: the same run as the tip of master (test 9499), so the comparison above already covers it. No test changes behaviour relative to the tip of master: every failure above fails there too, byte for byte. The approved output for those tests is out of date, which is a baseline to review rather than a regression in this branch. |
CCExtractor CI platform finished running the test files on windows. 167/237 tests matched the approved output:
70 tests do not match the approved output. That is the pass/fail verdict. Whether this branch caused it is a separate question, answered below.
Compared with the tip of master — test 9495, commit 3af3fc2:
Pass there, fail here:
Compared with the commit this branch was cut from: the same run as the tip of master (test 9495), so the comparison above already covers it. This branch changes the behaviour of 1 test(s) relative to the tip of master. Those are the ones worth looking at; anything else in the list fails the same way on both sides. |
ccx_common_char_encoding.h in ccx_decoders_common.c is unused — the functions it declares moved to ccx_encoders_common.c after a 2014 refactor and the include was never cleaned up.
ccx_demuxer_mxf.h in general_loop.c is also unused — general_loop.c handles MXF via ccx_mxf_getmoredata, which is already declared in lib_ccx.h (included separately). This header appears to have been added by reflex alongside MXF support in 2017 without ever being needed.
A third flagged include, ffmpeg_intgr.h in general_loop.c, was investigated and left untouched — it's a genuine dependency under
#ifdef ENABLE_FFMPEG(used at general_loop.c:1418), invisible to clangd's default indexing since that flag isn't set during static analysis.Closes #2328
In raising this pull request, I confirm the following (please check boxes):
Reason for this PR:
Sanity check:
Repro instructions
This isn't a crash-reproducing bug fix, it's a dead-code cleanup, so "reproduction" here means verifying the includes are genuinely unused and that removing them changes nothing functionally.
To reproduce the original finding:
src/lib_ccx/ccx_decoders_common.candsrc/lib_ccx/general_loop.cin an IDE with clangd enabled)ccx_common_char_encoding.h(ccx_decoders_common.c:6) andccx_demuxer_mxf.h(general_loop.c:20) as included but not directly usedTo verify each finding before this PR:
grep -n "get_char_in_latin_1\|get_char_in_unicode\|get_char_in_utf_8\|cctolower\|cctoupper" src/lib_ccx/ccx_decoders_common.creturns nothinggrep -n "ccx_probe_mxf\|ccx_mxf_init\|MXFTrack\|MXFContext" src/lib_ccx/general_loop.creturns nothinggit log -p --follow src/lib_ccx/ccx_decoders_common.caround commit301c2a71shows the original functions that needed this header, and shows they've since moved toccx_encoders_common.cgit log -p --follow src/lib_ccx/general_loop.caround commit42ab1640("Add MXF support") showsccx_demuxer_mxf.hwas added alongside theCCX_SM_MXFcase, but the actual function used (ccx_mxf_getmoredata) is declared inlib_ccx.h, already included separatelyTo verify this PR doesn't break anything:
cmake --build build(or the standard project build)No functional or behavioral change; only the two confirmed-dead includes are removed.