What changed, and why it matters
This commit removes unused variables and comments out one unused variable to silence compiler warnings. It does not change program behavior or fix any security issue. The wallet code contains an old developer comment about a past race condition, but this patch does not address it.
No security action required. Treat as routine code hygiene.
Security signals we found
No security-relevant code change
Comment references historical race condition but patch does not modify related logic
Pure dead-code removal / warning suppression
Evidence from the diff
The diff deletes two unused local variables in windows_service.cpp (SERVICE_STATUS_PROCESS, DWORD, SERVICE_STATUS) and comments out an unused bool refreshed = false; in wallet2.cpp. These are non-functional cleanups to eliminate compiler warnings. The nearby comment referencing a historical txpool race condition is preserved but not acted upon.
Changed components
src/daemonizer/windows_service.cppsrc/wallet/wallet2.cppInspect captured patch +1 / −5
diff --git a/src/daemonizer/windows_service.cpp b/src/daemonizer/windows_service.cpp
index f1b86af..c58f9cf 100644
--- a/src/daemonizer/windows_service.cpp
+++ b/src/daemonizer/windows_service.cpp
@@ -224,9 +224,6 @@ bool start_service(
{
tools::msg_writer() << "Starting service";
- SERVICE_STATUS_PROCESS service_status = {};
- DWORD unused = 0;
-
service_handle p_manager{
OpenSCManager(
nullptr
@@ -353,7 +350,6 @@ bool uninstall_service(
return false;
}
- SERVICE_STATUS status = {};
if (!DeleteService(p_service.get()))
{
tools::fail_msg_writer() << "Couldn't uninstall service: " << get_last_error();
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index b073357..1f5f152 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -4095,7 +4095,7 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo
// "I had to reorder some code to fix... a timing info leak IIRC. In turn, this undid something I had fixed before, ... a subtle race condition with the txpool.
// It was pretty subtle IIRC, and so I needed time to think about how to refix it after the move, and I never got to it."
// https://github.com/monero-project/monero/pull/6097
- bool refreshed = false;
+ // bool refreshed = false;
std::shared_ptr<std::map<std::pair<uint64_t, uint64_t>, size_t>> output_tracker_cache;
hw::device &hwdev = m_account.get_device();
Why this scored 12/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.