Reduce remaining app-local warning debt after external noise cleanup
Summary¶
The first warning-noise reduction pass already contained SDK and third-party
header spam and cut the Release|x64 warning floor from 5092 to 828.
What remains is now mostly app-local warning debt from srchybrid, and that
debt should be tracked separately from the deferred REF-021 Winsock cleanup.
This item is about the remaining local warnings that are still worth fixing in our own code, plus explicit triage of the buckets that are probably framework noise rather than real correctness work.
Current State¶
Original reference build:
EMULE_WORKSPACE_ROOT\workspaces\workspace\state\build-logs\20260419-172533
Original top remaining warning buckets from Release|x64:
C5219: 464C4191: 96C4244: 52C5262: 44C5033: 34C4311: 30
Representative remaining local hotspots:
srchybrid/StatisticsDlg.cpp—C5219(114)srchybrid/PartFile.cpp—C5219(14)srchybrid/Statistics.cpp—C5219(12)srchybrid/EmuleDlg.cpp—C5219(11)srchybrid/FileDetailDialogInfo.cpp—C5219(8)srchybrid/UploadQueue.cpp—C5219(6)srchybrid/ServerConnect.cpp—C4244(5)srchybrid/SearchListCtrl.cpp—C5219(5),C5262(4)srchybrid/DownloadListCtrl.cpp—C4244(3),C5262(2)
Updated reference build:
EMULE_WORKSPACE_ROOT\workspaces\workspace\state\build-logs\20260502-112930- command:
build-app --config Release --platform x64 --variant main - result: build succeeded;
APP mainreported862warnings in the workspace summary, while the raw MSBuild footer reported391 Warning(s) - de-duplicated located compiler warning sites in the app log:
379 - distinct command-line warning families:
2 - distinct linker-warning lines:
58
Current located compiler warning buckets from Release|x64:
C5219- Count: 225
-
Practical impact: Float-to-integral conversion after arithmetic conversion. Usually UI/stat precision debt, but it can matter in transfer limits, progress, scheduling, scoring, and persisted values.
-
C4191 - Count: 48
-
Practical impact: Unsafe function-pointer casts. Many are likely MFC message-map plumbing, but any handler signature mismatch would become a real call-convention/runtime bug. Needs triage, not blanket removal.
-
C4244 - Count: 26
-
Practical impact: Narrowing conversions. Highest value when source width is semantically larger, for example
GetTickCount64()intoDWORD, sizes, offsets, and rates. -
C5262 - Count: 18
-
Practical impact: Implicit fallthrough. Some sites are intentional UI flow, but the compiler cannot distinguish that from missed
breaklogic. -
C5033 - Count: 17
-
Practical impact:
registeris no longer supported. Cosmetic/source-age cleanup unless it blocks a stricter toolchain. -
C4311 - Count: 15
-
Practical impact: Pointer or handle truncation to smaller integer type. High x64 risk if the truncated value is used as an identifier, menu handle, window data, or callback payload.
-
C4312 - Count: 7
-
Practical impact: Conversion from smaller integer to pointer-sized type. Often paired with legacy Win32/MFC message packing and should be audited with adjacent
C4311/C4302. -
C4302 - Count: 6
-
Practical impact: Truncation from pointer-sized value to smaller type. High x64 risk for handles and pointer cookies.
-
C5038 - Count: 4
-
Practical impact: Member initializer order mismatch. Usually not a bug when initializers are independent, but real if later members depend on earlier initialization side effects.
-
C5245 - Count: 4
-
Practical impact: Unreferenced internal function removed. Low runtime risk; useful dead-code signal.
-
C4840 - Count: 3
-
Practical impact: Non-portable variadic argument use. Real type-safety issue when passing C++ objects such as
CStringthrough C varargs. -
C5039 - Count: 3
-
Practical impact: Potential throwing callback passed to C/Win32 API. Real stability risk if an exception crosses a C ABI callback boundary.
-
C4100 - Count: 2
-
Practical impact: Unreferenced formal parameter. Low risk; can be intentional virtual/API compatibility.
-
C4266 - Count: 1
- Practical impact: Hidden virtual override. Can be real behavior drift if the intended override signature no longer matches the base.
Current top files by de-duplicated located compiler warnings:
| File | Count | Dominant concern |
|---|---|---|
srchybrid/StatisticsDlg.cpp |
116 | Mostly C5219; UI/stat numeric intent. |
srchybrid/Scanner.cpp |
18 | Mixed local warning debt. |
srchybrid/DownloadListCtrl.cpp |
17 | Pointer/handle casts plus fallthrough and narrowing. |
srchybrid/Statistics.cpp |
16 | Mostly numeric precision/conversion debt. |
srchybrid/PartFile.cpp |
16 | Transfer/file numeric conversion debt. |
srchybrid/EmuleDlg.cpp |
15 | Mixed UI/control-flow and initialization warnings. |
srchybrid/Emule.cpp |
9 | Initializer-order and legacy command-line override warnings. |
srchybrid/SearchListCtrl.cpp |
9 | UI fallthrough/numeric warning debt. |
srchybrid/FileDetailDialogInfo.cpp |
8 | UI/detail numeric conversion debt. |
srchybrid/BarShader.cpp |
7 | Drawing/math conversion debt. |
srchybrid/UploadQueue.cpp |
7 | Queue/rate numeric conversion debt. |
Other notable files with 5 warnings each: ListenSocket.cpp,
MediaInfo.cpp, ServerConnect.cpp, SharedDirsTreeCtrl.cpp, and
SharedFilesCtrl.cpp. Files with 4 warnings each include
UPnPImplPcpNatPmp.cpp, KadLookupGraph.cpp, OtherFunctions.cpp, and
SearchList.cpp.
Suppression Context¶
The active project intentionally runs at a high warning level:
srchybrid\emule.vcxprojusesWarningLevel=EnableAllWarningssrchybrid\emule.vcxprojkeeps external headers quiet withExternalWarningLevel=TurnOffAllWarningssrchybrid\emule.vcxprojstill marks external includes with/external:anglebracketsand/external:I$(ThirdPartyRoot)to keep third-party and SDK header mass out of the local warning floor
The 2026-05-02 warning audit found repeated D9025 command-line warnings
because MSBuild derived /external:W4 from EnableAllWarnings, then the
project appended raw /external:W0 in AdditionalOptions. This was build
configuration noise, not source warning debt. The fix is to express the desired
external-header policy through ExternalWarningLevel=TurnOffAllWarnings and
keep raw /external:W* switches out of AdditionalOptions.
The broad warning suppressions in srchybrid\Stdafx.h:43-69 are therefore not
the only reason warning debt exists; many warnings still surface even with those
suppression pragmas in place. The suppressions currently hide additional
families that should not be removed blindly:
- hidden switch-enum coverage:
4061,4062 - unsafe function-pointer casts:
4191 - hidden or mismatched virtual overrides:
4263,4264,4265,4266 - signed/unsigned conversions:
4365 - object layout, generated special member, and padding noise:
4435,4625,4626,4820,5026,5027 - exception and local-static behavior changes:
4571,4640 - preprocessor and inline/noise diagnostics:
4619,4668,4710,4711 - performance/Spectre/volatile diagnostics:
4738,4746,5045,5220 - GUID attribute noise:
4917
The same file still defines _CRT_SECURE_NO_DEPRECATE and
_WINSOCK_DEPRECATED_NO_WARNINGS, and emule.vcxproj still injects
_CRT_SECURE_NO_DEPRECATE as a project-wide preprocessor definition. Those are
owned by REF-021; this item tracks the active app-local warning floor that is
visible even before removing those deprecation suppressions.
Actual Impact Notes¶
Highest value source fixes:
C4244,C4311,C4302, andC4312are the strongest correctness signals because they can truncate time values, sizes, pointers, or Win32 handles on x64.C5262should be reviewed before changing logic. Add explicit[[fallthrough]]only where existing fallthrough is intentional; otherwise add the missingbreakor equivalent control flow.C4840should be fixed locally with explicitLPCTSTRextraction or type-safe formatting instead of passing C++ objects through varargs.C5038should be fixed where constructor initializer order obscures dependencies; this is low-cost and removes a class of future maintenance mistakes.C5039should be fixed by making callbacksnoexceptor wrapping exception boundaries before handing function pointers to C/Win32 APIs.C4266is a single site but deserves review because hidden virtual functions can silently change dispatch behavior.
Lower value cleanup:
C5033andC4100are mostly source-age or interface-noise cleanup.C5245points at removable dead internal functions; fix only when touching adjacent code unless warning-floor work is explicitly prioritized.- Most
C5219in display/statistics code is likely low-to-medium runtime risk, butC5219in scheduling, scoring, transfer limits, byte counts, or persisted values should be audited before being dismissed as cosmetic.
Current concrete examples from the 2026-05-02 log:
srchybrid\ClientUDPSocket.cpp:439assignsGetTickCount64()intoDWORD. This can reintroduce 32-bit tick wrap behavior in UDP queue timing logic.srchybrid\DownloadListCtrl.cpp:1073,1096,1203, and1211cast menu handles throughUINT. On x64 this is handle truncation and should be replaced with pointer-width-safe types.srchybrid\kademlia\kademlia\Search.cpp:1242-1245passesuint32values asLPCTSTRvarargs payloads. This appears to be legacy typed-varargs packing and needs a careful local audit rather than a mechanical cast change.srchybrid\DownloadListCtrl.cpp:831and1414are representativeC5262fallthroughs. Some may be intended UI command grouping; annotate or split only after reading the surrounding switch.srchybrid\UPnPImplPcpNatPmp.cpp:248,306, and308passCStringinto variadic calls. These should use explicit(LPCTSTR)or a type-safe helper.srchybrid\Emule.cpp:796,797, and808, plussrchybrid\PPgTweaks.cpp:641, showC5038initializer-order drift.srchybrid\OtherFunctions.cpp:3368,OtherFunctions.cpp:3383, andsrchybrid\TreeOptionsCtrl.cpp:1941pass callbacks to C/Win32 APIs where a throwing callback would cross an ABI boundary.srchybrid\Emule.cpp:630is the currentC4266hidden-virtual site for aCCommandLineInfo::ParseParamoverload.
Linker warning impact:
LNK4286warnings were mostlypcpnatpmp.libimporting UCRT symbols.LNK4098reported a default-library conflict withMSVCRT.- Root cause: libpcpnatpmp was configured by CMake with MSVC's dynamic CRT
defaults (
/MDand/MDd) while the app policy requires the static CRT (/MTand/MTd). - Fix direction: handle this in build orchestration by passing
CMAKE_POLICY_DEFAULT_CMP0091=NEWandCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>when configuring libpcpnatpmp. Do not hide the conflict with/NODEFAULTLIB:MSVCRT. - Verified fix: clean libpcpnatpmp rebuilds now generate
pcpnatpmp.vcxprojwithMultiThreadedDebug/MultiThreadedruntime settings for x64 and ARM64, and the active app links no longer emitLNK4098orLNK4286in the checked Debug/Release x64 and ARM64 logs.
Current Mainline Progress¶
Commit 4afa47b (CI-010: reduce EmuleDlg callback warnings) landed on
main:
BindLossIpInterfaceChangeCallback()andBindLossUnicastAddressChangeCallback()are now declarednoexcept, making the Win32 notification callback boundary explicit and removing the two local C5039 callback warnings surfaced by recompilingEmuleDlg.cpp.CemuleApp::IsIdleMessage()now storesGetTickCount64()state in anULONGLONGstatic instead of truncating throughDWORD, removing the two local C4244 warnings in that idle-processing path.
Commit edda7c6 (CI-010: tighten PCP NAT-PMP warning types) landed on
main:
- PCP/NAT-PMP warning logs now store
GetPcpStateText()results in localCStringvariables and pass explicitLPCTSTRpointers through the logging varargs boundary, removing the local C4840 warnings. pcp_new_flow()now receives an explicituint8_tprotocol value, removing the local protocol-narrowing warning while preserving the existing TCP/UDP selection behavior.
Commit b97bcb7 (CI-010: keep UDP queue timing wide) landed on main:
CClientUDPSocket::SendControlData()now keeps its queue-age comparison timestamp asULONGLONG, matchingUDPPack::dwTimeand avoiding truncation ofGetTickCount64()before UDP control-packet expiry checks.
Commit dafa207 (CI-010: mark font enumeration callback noexcept) landed on
main:
CTreeOptionsFontNameCombo::_EnumFontProc()and its local bridge method are nownoexcept, making the GDIEnumFonts()callback boundary explicit and removing the local C5039 warning.
Commit 206622c (CI-010: avoid download menu handle truncation) landed on
main:
DownloadListCtrl.cppnow enables and removes popup submenu items by finding the matchinghSubMenuby position instead of castingHMENUthroughUINT.- This removes the local C4311/C4302 handle-truncation warnings for the download context menu while preserving the existing menu layout and command IDs.
Commit abeaa01 (CI-010: keep download list ticks wide) landed on main:
CtrlItem_Struct::dwUpdatedandCDownloadListCtrl::m_dwLastAvailableCommandsChecknow storeGetTickCount64()values asULONGLONG, removing the local C4244 truncation warnings in progress-bar cache expiry and available-command throttling.
Commit cfc5c1a (CI-010: annotate download list fallthroughs) landed on
main:
DownloadListCtrl.cppnow marks its two intentional switch fallthroughs with[[fallthrough]]: progress-column drawing falls into normal cell drawing, and active part-file cancel/delete handling falls into paused-file deletion after optional next-file scheduling.
Commit 8c07361 (CI-010: make download progress size cast explicit) landed
on main:
CDownloadListCtrl::GetFinishedSize()now makes the completed-byte total to taskbar-progressfloatconversion explicit. This removes the local C5219 display/progress warning while preserving the existing taskbar progress math.
Commit da3de63 (CI-010: avoid shared menu handle truncation) landed on
main:
SharedDirsTreeCtrl.cppandSharedFilesCtrl.cppnow enable priority popup submenus by finding the matchinghSubMenuby position instead of castingHMENUthroughUINT.- This removes the local C4311/C4302 handle-truncation warnings for the shared files priority menus while preserving existing menu layout and command IDs.
Commit 9c4d686 (CI-010: clarify shared files fallthroughs) landed on
main:
SharedDirsTreeCtrl.cppnow uses explicitbreakstatements for the priority command switch and the outer file-operation switch, removing two accidental-looking fallthrough warnings without changing command handling.SharedFilesCtrl.cppnow marks the intentional icon-then-text drawing fallthrough with[[fallthrough]].
Commit 2590f1f (CI-010: remove dead shared tree helper) landed on main:
- Removed the unreferenced internal
FindNearestSharedTreeParentItem()helper fromSharedDirsTreeCtrl.cpp, eliminating the local C5245 dead-code warning while leaving the active shared-tree parent path helper intact.
Commit 97d65b3 (CI-010: keep server upload ticks wide) landed on main:
CServerConnect::connectionattemptsnow keys connection attempts byULONGLONG, and the timeout/removal iterator keys match that width. This keepsGetTickCount64()values intact for server connect timeout handling.CUploadQueue::m_dwRemovedClientByScorenow stores the existingGetTickCount64()initializer inULONGLONGstorage, removing another queue-timing truncation point.
Commit e56b38a (CI-010: clarify search list fallthroughs) landed on
main:
SearchListCtrl.cppnow marks the owner-draw file-name switch fallthroughs explicitly: the file-name cases adjust tree/icon indentation and then fall into the shared text drawing path.DrawSourceChild()now breaks immediately after the default text drawing path, removing the empty fallthrough into the file-type/file-hash cases.
Commit b41fab9 (CI-010: extract search summary file size) landed on
main:
SearchListCtrl.cppnow extracts theCEMFileSizewrapper touint64before passing it throughCString::Format()for copied search summaries, removing the local C4840 varargs warning without changing copied output.
Commit e7505de (CI-010: make search display math explicit) landed on
main:
SearchListCtrl.cppnow uses explicit float/double conversions for search result color-shade interpolation, debug Kad trust display, and MiB display formatting.- The touched conversions are display-only; the existing truncating RGB shade behavior and formatted output precision are preserved.
Commit e2f4007 (CI-010: match app initializer order) landed on main:
CemuleAppconstructor initializers now match the member declaration order for the IP filter/geolocation/app-state cluster and the queued-log counter/startup-bind cluster.- This removes the local C5038 initializer-order warnings without changing actual construction order or runtime behavior.
Commit c8ea5d6 (CI-010: expose base command-line parser overloads) landed
on main:
CEmuleCommandLineInfonow exposes the baseCCommandLineInfo::ParseParamoverload set before overriding the activeTCHARoverload.- This removes the local C4266 hidden-virtual warning without changing the
existing
-c <base-dir>skip behavior.
Commit 1c42e02 (CI-010: remove dead app journal lookup) landed on main:
- Removed the unused const
FindMonitoredSharedRootJournalState()overload fromEmule.cpp. - The mutable lookup overload remains in use for monitored-share journal state loading and refresh paths.
Commit 6bdddcf (CI-010: use pointer-width shell icon cache casts) landed on
main:
CemuleApp::GetFileTypeSystemImageIdx()now stores and retrieves shell icon indices in the existingCMapStringToPtrcaches withLongToPtr()andPtrToLong().- This removes the local C4311/C4302/C4312 pointer-payload warnings while preserving the existing extension-to-icon-index cache structure.
Commit 6b09478 (CI-010: keep local source request ordering wide) landed on
main:
CDownloadQueue::ProcessLocalRequests()now keeps the local-server source request priority comparison inULONGLONGtick space instead of narrowingCPartFile::m_LastSearchTimethrough aDWORD.- The existing priority bias and request selection behavior are preserved.
Commit 77f53d8 (CI-010: make download queue progress math explicit) landed
on main:
CDownloadQueue::Process()now makes the byte-count to float conversion explicit when updatingtheStats.m_fGlobalDoneandtheStats.m_fGlobalSize.- The progress totals remain float-based for the existing UI/status consumers; only the conversion intent is clarified.
Commit 55c36eb (CI-010: make credit ratio math explicit) landed on
main:
CClientCredits::GetScoreRatio()now captures uploaded/downloaded byte totals once and uses explicit float conversions at the established ratio, exponential cap, and linear cap calculations.- The existing credit formula and clamp behavior are preserved.
Commit 9cf16a3 (CI-010: annotate IRC registration fallthrough) landed on
main:
IrcMain.cppnow uses[[fallthrough]]for the intentional numeric-reply001to002/003/004path. Reply001still sets logged-in state, optionally requests the channel list, runs perform commands, and then shares the normal status-display path.
Commit cdb38f5 (CI-010: annotate part file fallthroughs) landed on
main:
PartFile.cppnow uses[[fallthrough]]for the intentionalDS_ONQUEUEto shared reask/connect handling path and for thePB_READYtoPB_PENDINGflush-buffer continue path.- Existing UDP reask behavior, shared TCP/connect reask handling, and buffered-write state handling are preserved.
Commit 173acb6 (CI-010: make part file progress math explicit) landed on
main:
PartFile.cppnow makes its progress, time-remaining, rating, progress-bar, and availability integer-to-floating conversions explicit.- The touched values are existing display, estimate, and summary calculations; the established float/double domains and rounding behavior are preserved.
Commit e017824 (CI-010: match tweaks initializer order) landed on main:
PPgTweaks.cppnow initializesm_bUseSystemFontForMainControlsbeforem_bVerbose, matching the declaration order inPPgTweaks.h.- This removes the local C5038 initializer-order warning without changing actual construction order.
Commit 984f272 (CI-010: annotate proxy error fallthrough) landed on
main:
EMSocket.cppnow marks the intentionalPROXYERROR_NOCONNtoPROXYERROR_REQUESTFAILEDfallthrough in proxy-layer callback handling.- The existing behavior is preserved: no-connection proxy failures still set the connect-failed flag and then share the verbose proxy error detail path.
Commit be22d9f (CI-010: clarify media info switch breaks) landed on
main:
FileInfoDialog.cppnow breaks explicitly after the handled MPEG version and layer cases that previously fell intodefault: break.- The parsed media-format text and audio format tag behavior are unchanged.
Commit 913b54f (CI-010: annotate IRC smiley fallthrough) landed on
main:
IrcWnd.cppnow marks the intentionalIDC_SMILEYtodefaultfallthrough inCIrcWnd::OnCommand().- Existing behavior is preserved: the smiley command runs and returns immediately instead of falling through to the shared input-focus reset.
Commit e73b24b (CI-010: keep delayed edit ticks wide) landed on main:
CEditDelayed::m_dwLastModifiednow storesGetTickCount64()values inULONGLONGstorage instead of narrowing throughDWORD.- This removes the delayed filter edit's local C4244 timestamp truncation warnings while preserving the existing 400 ms delayed-evaluation behavior.
Commit bdbe018 (CI-010: avoid Kad search metadata pointer truncation)
landed on main:
- Kad search result metadata still uses the existing legacy varargs shape, but
the
uint32payloads are now packed and unpacked throughUINT_PTRinstead of truncating throughuint32pointer casts. - This removes the local C4311/C4302 pointer-truncation warnings in
SearchList.cppwhile preserving the existingTAGTYPE_UINT32metadata values for length, bitrate, and source count.
Commit e4fd71e (CI-010: mark CRT alloc hook pointer noexcept) landed on
main:
- The debug CRT allocation hook's saved previous-hook pointer now uses the same
noexceptcallback contract aseMuleAllocHook(), and the debug statistics translation units share that declaration. - This removes the local C5039 extern-C callback-boundary warnings around
_CrtSetAllocHook()while preserving the existing debug-only allocation-hook behavior.
Scoped validation:
python -m emule_workspace validatepython -m emule_workspace build app --config Debug --platform x64- First pass rebuilt
EmuleDlg.cppand reduced its reported warnings from 34 to 26. - Immediate incremental pass completed all app targets with
0warnings. - The PCP/NAT-PMP slice completed all app targets with
0warnings. - The UDP timing slice completed all app targets with
0warnings. - The TreeOptions callback slice first rebuilt UI dependents and surfaced
existing unrelated warning debt; the immediate incremental pass completed
all app targets with
0warnings. - The download menu handle-truncation slice first rebuilt
DownloadListCtrl.cppand left only unrelated local warning families; the immediate incremental pass completed all app targets with0warnings. - The download-list tick-width slice first rebuilt UI dependents and left only
unrelated local warning families; the immediate incremental pass completed
all app targets with
0warnings. - The download-list fallthrough slice rebuilt
DownloadListCtrl.cppand left only unrelated local warning families; the immediate incremental pass completed all app targets with0warnings. - The download progress-size slice rebuilt
DownloadListCtrl.cpp; its only remaining local warning is the separately triaged MFC message-map C4191 bucket. The immediate incremental pass completed all app targets with0warnings. - The shared menu handle-truncation slice rebuilt the shared files UI surfaces
and left only unrelated local warning families; the immediate incremental
pass completed all app targets with
0warnings. - The shared-files fallthrough slice rebuilt the same UI surfaces and left
only unrelated local warning families; the immediate incremental pass
completed all app targets with
0warnings. - The dead shared-tree helper slice completed all app targets with
0warnings. - The server/upload tick-width slice rebuilt broad app surfaces and left only
unrelated local warning families. The immediate incremental pass completed
all app targets with
0warnings. - The search-list fallthrough slice rebuilt
SearchListCtrl.cpp; its remaining local warnings are separate C4840/C5219 numeric and varargs warnings. The immediate incremental pass completed all app targets with0warnings. - The search-summary file-size slice rebuilt
SearchListCtrl.cpp; the local C4840 warning is gone and the remaining local warnings are C5219 numeric display conversions. The immediate incremental pass completed all app targets with0warnings. - The search display-math slice rebuilt
SearchListCtrl.cppand completed all app targets with0warnings on the first pass. - The app initializer-order slice rebuilt
Emule.cpp; the local C5038 warnings are gone and the remaining local warnings are separate C4266, C5039, pointer-payload, and dead-helper items. The immediate incremental pass completed all app targets with0warnings. - The command-line parser overload slice rebuilt
Emule.cpp; the local C4266 warning is gone and the remaining local warnings are separate C5039, pointer-payload, and dead-helper items. The immediate incremental pass completed all app targets with0warnings. - The app journal lookup slice rebuilt
Emule.cpp; the local C5245 warning is gone and the remaining local warnings are separate C5039 and pointer-payload items. The immediate incremental pass completed all app targets with0warnings. - The shell-icon cache slice rebuilt
Emule.cpp; the local C4311/C4302/C4312 pointer-payload warnings are gone and only the separate debug CRT hook C5039 warnings remain in that file. The immediate incremental pass completed all app targets with0warnings. - The local source-request ordering slice rebuilt
DownloadQueue.cpp; the local C4244 tick truncation warning is gone and remaining warnings in that file are separate C5219 display/ratio math. The immediate incremental pass completed all app targets with0warnings. - The download queue progress-math slice rebuilt
DownloadQueue.cppand completed all app targets with0warnings on the first pass. - The credit-ratio math slice rebuilt
ClientCredits.cppand completed all app targets with0warnings on the first pass. - The IRC registration fallthrough slice rebuilt
IrcMain.cppand completed all app targets with0warnings on the first pass. - The part-file fallthrough slice rebuilt
PartFile.cpp; the local C5262 warnings are gone and the remaining local warnings are separate C5219 numeric conversion items. - The part-file progress-math slice rebuilt
PartFile.cpp; local compiler warnings dropped to zero. The first pass reported one Crypto++ weak algorithm banner line as a workspace warning, and the immediate incremental pass completed all app targets with0warnings. - The tweaks initializer-order slice rebuilt the current
Release|x64main target and completed with0warnings. - The proxy error fallthrough slice rebuilt the current
Release|x64main target and completed with0warnings. - The media-info switch-break slice rebuilt the current
Release|x64main target and completed with0warnings. - The IRC smiley fallthrough slice rebuilt the current
Release|x64main target and completed with0warnings. - The delayed-edit tick-width slice rebuilt the current
Debug|x64andRelease|x64main targets with CFG verification.EditDelayed.cpprebuilt in both logs without its previous C4244 timestamp warnings. Build logs:workspaces\workspace\state\build-logs\20260510-062418\summary.jsonandworkspaces\workspace\state\build-logs\20260510-062432\summary.json. - The Kad search metadata pointer-width slice rebuilt the current
Debug|x64andRelease|x64main targets with CFG verification.SearchList.cppandkademlia\kademlia\Search.cpprebuilt without the previous C4311/C4302 pointer-truncation warnings. Build logs:workspaces\workspace\state\build-logs\20260510-062718\summary.jsonandworkspaces\workspace\state\build-logs\20260510-062728\summary.json. - The CRT allocation hook no-throw pointer slice rebuilt the current
Debug|x64andRelease|x64main targets with CFG verification. The rebuilt logs no longer contain the previous C5039_CrtSetAllocHookwarnings. Build logs:workspaces\workspace\state\build-logs\20260510-063024\summary.jsonandworkspaces\workspace\state\build-logs\20260510-063038\summary.json.
The item remains In Progress: the remaining EmuleDlg.cpp warnings are
separate MFC message-map and UI/stat numeric warnings, and the broader
Release|x64 warning floor still needs dedicated follow-up slices.
Triage Split¶
Real source corrections to make later¶
C5262 implicit fallthroughs¶
These are control-flow ambiguities and should be fixed or marked explicitly.
Representative sites:
srchybrid/DownloadListCtrl.cpp:754srchybrid/DownloadListCtrl.cpp:1335srchybrid/SearchListCtrl.cpp:1303srchybrid/SearchListCtrl.cpp:1429srchybrid/SearchListCtrl.cpp:1431srchybrid/SearchListCtrl.cpp:1448
C4244 integer narrowing that may truncate¶
These should be audited for real range intent rather than cast away blindly.
Representative sites:
srchybrid/DownloadListCtrl.cpp:444srchybrid/EmuleDlg.cpp:3117srchybrid/UploadQueue.cpp:89srchybrid/ServerConnect.cpp(multiple current sites)
Targeted C5219 math/precision cleanup¶
These are often not hard bugs, but in transfer, stats, and progress code they should be made explicit where the numeric intent is underspecified.
Highest-yield current clusters:
srchybrid/StatisticsDlg.cppsrchybrid/PartFile.cppsrchybrid/Statistics.cppsrchybrid/EmuleDlg.cppsrchybrid/FileDetailDialogInfo.cppsrchybrid/UploadQueue.cppsrchybrid/kademlia/kademlia/Prefs.cpp
Buckets that need triage before changing code¶
C4191 MFC/message-map casts¶
These are likely framework-era plumbing noise rather than automatic bug fixes. Do not treat them as mandatory behavior changes until each site is reviewed.
Representative current sites:
srchybrid/DownloadListCtrl.cpp:72srchybrid/EmuleDlg.cpp:236srchybrid/KadSearchListCtrl.cpp:42
Default direction:
- prefer narrow suppression or framework-aware triage where appropriate
- do not churn stable MFC message-map plumbing just to force the warning count down
Out Of Scope¶
REF-021deprecated Winsock API cleanup and blanket warning-suppression removal remain explicitly deferred and are not part of this item.- SDK, MFC, ATL, and third-party header warning mass is already treated separately by the external-header cleanup and should not be reopened here.
Acceptance Criteria¶
- [ ] Remaining
C5262fallthrough sites in active local UI/transfer paths are fixed or explicitly annotated - [ ] High-risk
C4244local narrowing sites are reviewed and corrected where truncation is real - [ ] The highest-volume local
C5219clusters are reduced with explicit numeric intent - [ ]
C4191sites are triaged separately instead of being mixed into blind warning-count cleanup - [ ]
Release|x64warning totals drop further without re-expanding external-header noise or reviving deferredREF-021work
2026-04-19 Decision¶
This warning-cleanup follow-through was initially deferred in favor of more immediately useful runtime work. It has since reopened for narrow, low-drift warning reductions that fall out of Beta 0.7.3 hardening and validation work.