Skip to content

Fix Firo Build Warnings#1872

Open
navidR wants to merge 22 commits into
firoorg:masterfrom
navidR:fix-firo-build-warnings
Open

Fix Firo Build Warnings#1872
navidR wants to merge 22 commits into
firoorg:masterfrom
navidR:fix-firo-build-warnings

Conversation

@navidR

@navidR navidR commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

PR intention

This branch focuses on reducing Firo build-warning noise without changing runtime behavior or consensus/wallet semantics. It fixes straightforward project-owned warnings, scopes warning flags more carefully, keeps third- party/vendor warnings out of the main project warning surface, and moves immer into the depends system as a proper CMake-installed dependency instead of carrying it under src/. It also improves the CMake configure output by reporting expected global compile definitions/options as status notices while preserving stricter diagnostics for genuinely problematic global build-system usage.

@codeant-ai

codeant-ai Bot commented Jul 10, 2026

Copy link
Copy Markdown

User rahimi.nv@gmail.com does not have a PR Review subscription.

Go to Team management and add this email to the PR Review subscription.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b6737f14-00c7-4f82-8592-5f8517cba112

📥 Commits

Reviewing files that changed from the base of the PR and between 38e503e and d3e35ff.

📒 Files selected for processing (1)
  • src/crypto/progpow/lib/ethash/endianness.hpp

Summary by CodeRabbit

  • New Features

    • Added an Immer build dependency recipe and included it in the dependency set.
  • Bug Fixes

    • Fixed uninitialized variables (e.g., deserialization sizes, script check pointer, misc runtime initialization) and improved type-safety in a few runtime paths.
    • Improved Windows stack trace handling and adjusted OpenSSL PRNG seeding behavior.
    • Updated RPC execution signaling behavior and tightened some Qt/runtime safety details.
  • Breaking Changes

    • Removed the previously bundled Immer headers/APIs; downstream code must use an alternative Immer source.
  • Chores / Build

    • Applied consistent warning handling and warning-interface linkage across more build targets.

Walkthrough

The PR updates CMake warning propagation and dependency packaging, removes the immer::vector_transient header, and applies Qt, portability, initialization, stack-trace, Spark, wallet, serialization, and runtime cleanup changes.

Changes

Build and dependency configuration

Layer / File(s) Summary
Warning and dependency setup
CMakeLists.txt, cmake/*, depends/packages/*
Warning flags use warn_interface, linker wrap options are corrected, global-property messages become status notices, and Immer is added as a staged dependency.
Target warning wiring
src/**/CMakeLists.txt, src/secp256k1/cmake/*
Build targets link warn_interface; selected Boost headers become system includes and C compiler flags are language-scoped.
Immer API removal
src/immer/vector_transient.hpp
The transient vector header and public API are removed.

Qt and portability

Layer / File(s) Summary
Qt integration and locking
src/qt/*
Qt 6 APIs, high-DPI guards, RAII locking, target linkage, UI names, and test assertions are updated.
Portability and initialization fixes
src/{net_processing.h,netaddress.h,prevector.h,protocol.*,util.cpp,stacktraces.cpp}, src/rpc/server.cpp
Platform guards, initialization paths, buffer handling, stack-frame calculations, RPC signaling, and OpenSSL setup are adjusted.

Spark and wallet behavior

Layer / File(s) Summary
Spark runtime updates
src/spark/*, src/sparkname.cpp, src/wallet/*, src/test/*
Posted Spark tasks capture this, ownership-proof streams reserve capacity, Spark operation types use explicit conversion, unused locals are removed, and related tests and documentation are updated.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Suggested labels: build-system

Suggested reviewers: psolstice, firstcryptoman, aleflm

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.80% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: reducing build warnings in Firo.
Description check ✅ Passed The mandatory PR intention is present and matches the template; the optional code changes brief is missing but not critical.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 202dc508e1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@@ -1,4 +1,4 @@
packages:=boost openssl libevent gmp zlib backtrace tor bls-dash
packages:=boost openssl libevent gmp zlib backtrace tor bls-dash immer

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Expose the new immer include path to CMake

Adding immer to depends is not enough after deleting the vendored src/immer tree: the main CMake files never find_package/link an immer target or add the depends prefix include directory, while many production files still reach src/evo/deterministicmns.h:16 and include immer/map.hpp. In a normal clean depends build those headers install under the depends prefix but are not on any target's include path, so node/wallet/Qt compilation fails with the vendored headers gone; please add an immer include/target in CMake or keep the headers vendored.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

immer is header only and installed to (custom) root defined by toolchain. So it is okay.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
src/test/sparkname_tests.cpp (1)

793-809: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

LGTM! The non-capturing lambdas are valid in C++20 — overflowBlocks is a const variable of literal type initialized with a constant expression, so reading it is not an odr-use and doesn't require capture.

Optional: marking overflowBlocks as constexpr would make the compile-time constant intent explicit and unambiguously guarantee the non-capturing lambda is valid across all conforming compilers.

Optional: use constexpr for clarity
-    const uint32_t overflowBlocks = (uint32_t)INT_MAX + 1u; // minimal case that triggers the bug
+    constexpr uint32_t overflowBlocks = (uint32_t)INT_MAX + 1u; // minimal case that triggers the bug
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/test/sparkname_tests.cpp` around lines 793 - 809, Optionally declare
overflowBlocks as constexpr in the test case so its compile-time constant intent
is explicit and the non-capturing lambdas in the fresh-registration and renewal
scenarios remain clearly valid.
src/qt/bitcoin.cpp (1)

159-163: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider removing Qt5 fallback branches if the project only targets Qt 6.

The #else branches using QLibraryInfo::location() (and similar Qt5-only blocks throughout this file, e.g., lines 750–754, 901–911) are dead code if the project no longer builds with Qt 5. Based on learnings, Qt5-specific code blocks in src/qt/ are no longer needed in this repository. This can be addressed in a follow-up cleanup.

Also applies to: 171-172

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/qt/bitcoin.cpp` around lines 159 - 163, Remove obsolete Qt5 compatibility
branches throughout src/qt/bitcoin.cpp, including the QLibraryInfo::location()
fallback near qtTranslatorBase.load and the other Qt5-only preprocessor blocks
referenced in the comment. Keep the Qt6 implementations using
QLibraryInfo::path() and simplify the surrounding conditional compilation
accordingly.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/qt/bitcoin.cpp`:
- Around line 159-163: Remove obsolete Qt5 compatibility branches throughout
src/qt/bitcoin.cpp, including the QLibraryInfo::location() fallback near
qtTranslatorBase.load and the other Qt5-only preprocessor blocks referenced in
the comment. Keep the Qt6 implementations using QLibraryInfo::path() and
simplify the surrounding conditional compilation accordingly.

In `@src/test/sparkname_tests.cpp`:
- Around line 793-809: Optionally declare overflowBlocks as constexpr in the
test case so its compile-time constant intent is explicit and the non-capturing
lambdas in the fresh-registration and renewal scenarios remain clearly valid.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c9d953ca-0d07-4434-be9f-890f4298ce03

📥 Commits

Reviewing files that changed from the base of the PR and between 7fabe1e and 202dc50.

📒 Files selected for processing (102)
  • CMakeLists.txt
  • cmake/module/WarnAboutGlobalProperties.cmake
  • cmake/utilities.cmake
  • depends/packages/immer.mk
  • depends/packages/packages.mk
  • src/CMakeLists.txt
  • src/bench/CMakeLists.txt
  • src/crypto/CMakeLists.txt
  • src/crypto/progpow/CMakeLists.txt
  • src/immer/algorithm.hpp
  • src/immer/array.hpp
  • src/immer/array_transient.hpp
  • src/immer/atom.hpp
  • src/immer/box.hpp
  • src/immer/config.hpp
  • src/immer/detail/arrays/no_capacity.hpp
  • src/immer/detail/arrays/node.hpp
  • src/immer/detail/arrays/with_capacity.hpp
  • src/immer/detail/combine_standard_layout.hpp
  • src/immer/detail/hamts/bits.hpp
  • src/immer/detail/hamts/champ.hpp
  • src/immer/detail/hamts/champ_iterator.hpp
  • src/immer/detail/hamts/node.hpp
  • src/immer/detail/iterator_facade.hpp
  • src/immer/detail/rbts/bits.hpp
  • src/immer/detail/rbts/node.hpp
  • src/immer/detail/rbts/operations.hpp
  • src/immer/detail/rbts/position.hpp
  • src/immer/detail/rbts/rbtree.hpp
  • src/immer/detail/rbts/rbtree_iterator.hpp
  • src/immer/detail/rbts/rrbtree.hpp
  • src/immer/detail/rbts/rrbtree_iterator.hpp
  • src/immer/detail/rbts/visitor.hpp
  • src/immer/detail/ref_count_base.hpp
  • src/immer/detail/type_traits.hpp
  • src/immer/detail/util.hpp
  • src/immer/experimental/detail/dvektor_impl.hpp
  • src/immer/experimental/dvektor.hpp
  • src/immer/flex_vector.hpp
  • src/immer/flex_vector_transient.hpp
  • src/immer/heap/cpp_heap.hpp
  • src/immer/heap/debug_size_heap.hpp
  • src/immer/heap/free_list_heap.hpp
  • src/immer/heap/free_list_node.hpp
  • src/immer/heap/gc_heap.hpp
  • src/immer/heap/heap_policy.hpp
  • src/immer/heap/identity_heap.hpp
  • src/immer/heap/malloc_heap.hpp
  • src/immer/heap/split_heap.hpp
  • src/immer/heap/tags.hpp
  • src/immer/heap/thread_local_free_list_heap.hpp
  • src/immer/heap/unsafe_free_list_heap.hpp
  • src/immer/heap/with_data.hpp
  • src/immer/lock/no_lock_policy.hpp
  • src/immer/lock/spinlock_policy.hpp
  • src/immer/map.hpp
  • src/immer/map_transient.hpp
  • src/immer/memory_policy.hpp
  • src/immer/refcount/enable_intrusive_ptr.hpp
  • src/immer/refcount/no_refcount_policy.hpp
  • src/immer/refcount/refcount_policy.hpp
  • src/immer/refcount/unsafe_refcount_policy.hpp
  • src/immer/set.hpp
  • src/immer/set_transient.hpp
  • src/immer/table.hpp
  • src/immer/table_transient.hpp
  • src/immer/transience/gc_transience_policy.hpp
  • src/immer/transience/no_transience_policy.hpp
  • src/immer/vector.hpp
  • src/immer/vector_transient.hpp
  • src/net_processing.h
  • src/netaddress.h
  • src/prevector.h
  • src/protocol.cpp
  • src/protocol.h
  • src/qt/CMakeLists.txt
  • src/qt/automintdialog.cpp
  • src/qt/automintdialog.h
  • src/qt/bitcoin.cpp
  • src/qt/guiutil.cpp
  • src/qt/optionsdialog.cpp
  • src/qt/test/CMakeLists.txt
  • src/qt/test/rpcnestedtests.cpp
  • src/qt/walletmodel.cpp
  • src/qt/winshutdownmonitor.cpp
  • src/rpc/server.cpp
  • src/secp256k1/cmake/TryAppendCFlags.cmake
  • src/spark/sparkwallet.cpp
  • src/spark/state.cpp
  • src/sparkname.cpp
  • src/stacktraces.cpp
  • src/test/CMakeLists.txt
  • src/test/evo_simplifiedmns_tests.cpp
  • src/test/serialize_tests.cpp
  • src/test/sparkname_tests.cpp
  • src/util.cpp
  • src/validation.cpp
  • src/validation.h
  • src/wallet/CMakeLists.txt
  • src/wallet/rpcwallet.cpp
  • src/wallet/wallet.cpp
  • src/zmq/CMakeLists.txt
💤 Files with no reviewable changes (65)
  • src/immer/detail/hamts/node.hpp
  • src/immer/heap/unsafe_free_list_heap.hpp
  • src/immer/detail/hamts/champ.hpp
  • src/immer/flex_vector_transient.hpp
  • src/immer/detail/rbts/rrbtree.hpp
  • src/immer/detail/rbts/operations.hpp
  • src/immer/heap/identity_heap.hpp
  • src/immer/refcount/unsafe_refcount_policy.hpp
  • src/immer/heap/free_list_node.hpp
  • src/immer/refcount/no_refcount_policy.hpp
  • src/immer/heap/malloc_heap.hpp
  • src/immer/lock/no_lock_policy.hpp
  • src/immer/detail/ref_count_base.hpp
  • src/immer/detail/arrays/node.hpp
  • src/immer/refcount/refcount_policy.hpp
  • src/immer/transience/gc_transience_policy.hpp
  • src/immer/atom.hpp
  • src/immer/set.hpp
  • src/immer/box.hpp
  • src/immer/heap/tags.hpp
  • src/immer/detail/hamts/champ_iterator.hpp
  • src/immer/detail/rbts/rrbtree_iterator.hpp
  • src/immer/detail/rbts/visitor.hpp
  • src/qt/winshutdownmonitor.cpp
  • src/immer/set_transient.hpp
  • src/immer/detail/type_traits.hpp
  • src/immer/flex_vector.hpp
  • src/immer/array_transient.hpp
  • src/immer/detail/rbts/rbtree_iterator.hpp
  • src/immer/config.hpp
  • src/immer/heap/free_list_heap.hpp
  • src/immer/heap/cpp_heap.hpp
  • src/immer/detail/arrays/with_capacity.hpp
  • src/immer/algorithm.hpp
  • src/immer/heap/thread_local_free_list_heap.hpp
  • src/immer/detail/rbts/bits.hpp
  • src/immer/memory_policy.hpp
  • src/immer/transience/no_transience_policy.hpp
  • src/immer/experimental/detail/dvektor_impl.hpp
  • src/immer/heap/with_data.hpp
  • src/immer/heap/debug_size_heap.hpp
  • src/immer/refcount/enable_intrusive_ptr.hpp
  • src/rpc/server.cpp
  • src/immer/experimental/dvektor.hpp
  • src/immer/vector_transient.hpp
  • src/immer/detail/rbts/node.hpp
  • src/immer/detail/arrays/no_capacity.hpp
  • src/immer/vector.hpp
  • src/immer/heap/split_heap.hpp
  • src/immer/heap/gc_heap.hpp
  • src/immer/detail/hamts/bits.hpp
  • src/immer/array.hpp
  • src/immer/map_transient.hpp
  • src/immer/detail/combine_standard_layout.hpp
  • src/validation.cpp
  • src/immer/detail/util.hpp
  • src/immer/heap/heap_policy.hpp
  • src/immer/map.hpp
  • src/immer/detail/rbts/rbtree.hpp
  • src/wallet/rpcwallet.cpp
  • src/immer/table.hpp
  • src/immer/detail/rbts/position.hpp
  • src/immer/lock/spinlock_policy.hpp
  • src/immer/table_transient.hpp
  • src/immer/detail/iterator_facade.hpp

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
depends/builders/darwin.mk (1)

13-14: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use -mmacos-version-min for consistency with the host file.

The builder uses -mmacosx-version-min (the older deprecated alias) while depends/hosts/darwin.mk uses -mmacos-version-min (the current preferred form). Both are accepted by Clang and produce identical behavior, but aligning on the newer form avoids confusion and future deprecation noise.

♻️ Optional: align flag form with host file
 darwin_CC=$(shell xcrun -f clang) -isysroot$(shell xcrun --show-sdk-path) -mmacos-version-min=$(OSX_MIN_VERSION)
 darwin_CXX:=$(shell xcrun -f clang++) -stdlib=libc++ -isysroot$(shell xcrun --show-sdk-path) -mmacos-version-min=$(OSX_MIN_VERSION)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@depends/builders/darwin.mk` around lines 13 - 14, Replace the deprecated
-mmacosx-version-min flag with -mmacos-version-min in the darwin_CC and
darwin_CXX definitions, keeping the existing OSX_MIN_VERSION value and all other
compiler options unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@depends/builders/darwin.mk`:
- Around line 13-14: Replace the deprecated -mmacosx-version-min flag with
-mmacos-version-min in the darwin_CC and darwin_CXX definitions, keeping the
existing OSX_MIN_VERSION value and all other compiler options unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 804bfe8d-debf-412a-8b17-89db35b5b120

📥 Commits

Reviewing files that changed from the base of the PR and between 202dc50 and 38e503e.

📒 Files selected for processing (7)
  • depends/builders/darwin.mk
  • src/llmq/quorums_dkgsessionhandler.h
  • src/qt/forms/addressbookpage.ui
  • src/qt/forms/recover.ui
  • src/qt/forms/sendcoinsentry.ui
  • src/test/dbwrapper_tests.cpp
  • src/test/mtp_tests.cpp
✅ Files skipped from review due to trivial changes (3)
  • src/qt/forms/addressbookpage.ui
  • src/llmq/quorums_dkgsessionhandler.h
  • src/qt/forms/recover.ui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant