Fix networking.c debug flag and stderr routing#2212
Fix networking.c debug flag and stderr routing#2212NexionisJake wants to merge 1 commit intoCCExtractor:masterfrom
Conversation
- Remove #define DEBUG_OUT 0; replace all #if DEBUG_OUT guards with
#ifdef NETWORKING_DEBUG for compile-time opt-in via -DNETWORKING_DEBUG=ON
- Fix three error messages using printf() to use fprintf(stderr):
"Can't send BIN header", "Can't send BIN data", "Unable to send data"
- Fix format specifiers in debug logs: %zu for size_t, %d for int
(resolves -Wformat UB flagged in PR CCExtractor#2175 review)
- Add NETWORKING_DEBUG CMake option to CMakeLists.txt (single definition)
Fixes CCExtractor#2174
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit 03ad9e8...:
Your PR breaks these cases:
NOTE: The following tests have been failing on the master branch as well as the PR:
Congratulations: Merging this PR would fix the following tests:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Check the result page for more info. |
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 03ad9e8...:
Your PR breaks these cases:
NOTE: The following tests have been failing on the master branch as well as the PR:
Congratulations: Merging this PR would fix the following tests:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Check the result page for more info. |
|
Closing — this is a duplicate of #2175 (filed Mar 4) which covers the same changes. Thanks for the contribution though. |
Remove #define DEBUG_OUT 0; replace all #if DEBUG_OUT guards with #ifdef NETWORKING_DEBUG for compile-time opt-in via
-DNETWORKING_DEBUG=ON
to send data"
Fixes [BUG] networking.c: DEBUG_OUT uses integer toggle instead of CMake opt-in; error messages use printf() instead of fprintf(stderr) #2174
In raising this pull request, I confirm the following (please check boxes):
Reason for this PR:
exists.
Sanity check:
guide.
the changelog.
Repro instructions:
Bug 1 — Error messages swallowed when stdout is redirected
Run CCExtractor in networked/TCP mode and redirect stdout: