Skip to content

Silence maybe-uninitialized warning#504

Merged
sabasehrish merged 2 commits intoFramework-R-D:release/v0.2from
knoepfel:silence-maybe-uninitialized-warning
Apr 10, 2026
Merged

Silence maybe-uninitialized warning#504
sabasehrish merged 2 commits intoFramework-R-D:release/v0.2from
knoepfel:silence-maybe-uninitialized-warning

Conversation

@knoepfel
Copy link
Copy Markdown
Member

This PR silences the warning from GCC 15

/scratch/knoepfel/spack-fnal-v1.1.0/opt/spack/linux-x86_64_v3/gcc-15.1.0-abxaqozektww35loprnwqprbabwmk2l6/bin/g++ -DBOOST_CONTAINER_DYN_LINK -DBOOST_CONTAINER_NO_LIB -DBOOST_JSON_DYN_LINK -DBOOST_JSON_NO_LIB -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_E
XTERNAL -DSPDLOG_SHARED_LIB -I/scratch/knoepfel/phlex-devel/build/phlex -I/scratch/knoepfel/phlex-devel/srcs/phlex -isystem /scratch/knoepfel/phlex-devel/local/.spack-env/view/include -isystem /scratch/knoepfel/phlex-devel/local/.spack-env/._vi
ew/hos5diwqnxglhaz4bzavosr4bpxk5smx/include -O3 -fno-omit-frame-pointer -g -DNDEBUG -std=c++23   -UNDEBUG -Wall -Werror -Wunused -Wunused-parameter -pedantic -Wno-array-bounds -MD -MT phlex/test/CMakeFiles/unfold.dir/unfold.cpp.o -MF phlex/test
/CMakeFiles/unfold.dir/unfold.cpp.o.d -fmodules-ts -fmodule-mapper=phlex/test/CMakeFiles/unfold.dir/unfold.cpp.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o phlex/test/CMakeFiles/unfold.dir/unfold.cpp.o -c /scratch/knoepfel/phlex-devel/srcs/phle
x/test/unfold.cpp                                                                                                                                                                                                                                   
In file included from /scratch/knoepfel/spack-fnal-v1.1.0/opt/spack/linux-x86_64_v3/gcc-15.1.0-abxaqozektww35loprnwqprbabwmk2l6/lib/gcc/x86_64-pc-linux-gnu/15.1.0/../../../../include/c++/15.1.0/bits/shared_ptr.h:53,                             
                 from /scratch/knoepfel/spack-fnal-v1.1.0/opt/spack/linux-x86_64_v3/gcc-15.1.0-abxaqozektww35loprnwqprbabwmk2l6/lib/gcc/x86_64-pc-linux-gnu/15.1.0/../../../../include/c++/15.1.0/memory:82,                                        
                 from /scratch/knoepfel/phlex-devel/srcs/phlex/phlex/model/fwd.hpp:4,                                                                                                                                                               
                 from /scratch/knoepfel/phlex-devel/srcs/phlex/phlex/core/fwd.hpp:4,                                                                                                                                                                
                 from /scratch/knoepfel/phlex-devel/srcs/phlex/phlex/core/concepts.hpp:4,                                                                                                                                                           
                 from /scratch/knoepfel/phlex-devel/srcs/phlex/phlex/core/declared_fold.hpp:5,                                                                                                                                                      
                 from /scratch/knoepfel/phlex-devel/srcs/phlex/phlex/core/framework_graph.hpp:4,                                                                                                                                                    
                 from /scratch/knoepfel/phlex-devel/srcs/phlex/test/unfold.cpp:17:                                                                                                                                                                  
In copy constructor 'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(const std::__shared_ptr<_Tp, _Lp>&) [with _Tp = phlex::experimental::test::products_for_output; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]',                                
    inlined from 'std::shared_ptr<_Tp>::shared_ptr(const std::shared_ptr<_Tp>&) [with _Tp = phlex::experimental::test::products_for_output]' at /scratch/knoepfel/spack-fnal-v1.1.0/opt/spack/linux-x86_64_v3/gcc-15.1.0-abxaqozektww35loprnwqprbabw
mk2l6/lib/gcc/x86_64-pc-linux-gnu/15.1.0/../../../../include/c++/15.1.0/bits/shared_ptr.h:203:7,                                                                                                                                                    
    inlined from 'auto phlex::experimental::delegate(std::shared_ptr<_Tp>, R (T::*)(Args ...) const) [with R = void; T = test::products_for_output; Args = {const product_store&}]' at /scratch/knoepfel/phlex-devel/srcs/phlex/phlex/metaprogrammin
g/delegate.hpp:33:26,                                                                                                                                                                                                                               
    inlined from 'auto phlex::experimental::glue<T>::output(std::string, auto:95, phlex::concurrency) [with auto:95 = void (phlex::experimental::test::products_for_output::*)(const phlex::experimental::product_store&) const; T = phlex::experime
ntal::test::products_for_output]' at /scratch/knoepfel/phlex-devel/srcs/phlex/phlex/core/glue.hpp:147:33,                                                                                                                                           
    inlined from 'void CATCH2_INTERNAL_TEST_0()' at /scratch/knoepfel/phlex-devel/srcs/phlex/test/unfold.cpp:127:59:                                                                                                                                
/scratch/knoepfel/spack-fnal-v1.1.0/opt/spack/linux-x86_64_v3/gcc-15.1.0-abxaqozektww35loprnwqprbabwmk2l6/lib/gcc/x86_64-pc-linux-gnu/15.1.0/../../../../include/c++/15.1.0/bits/shared_ptr_base.h:1529:7: error: 'SR.11326' may be used uninitializ
ed [-Werror=maybe-uninitialized]                                                                                                                                                                                                                    
 1529 |       __shared_ptr(const __shared_ptr&) noexcept = default;                                                                                                                                                                                 
      |       ^~~~~~~~~~~~                                                                                                                                                                                                                          
In file included from /scratch/knoepfel/phlex-devel/srcs/phlex/phlex/core/registration_api.hpp:10,                                                                                                                                                  
                 from /scratch/knoepfel/phlex-devel/srcs/phlex/phlex/core/glue.hpp:7,                                                                                                                                                               
                 from /scratch/knoepfel/phlex-devel/srcs/phlex/phlex/core/framework_graph.hpp:7:                                                                                                                                                    
/scratch/knoepfel/phlex-devel/srcs/phlex/phlex/metaprogramming/delegate.hpp: In function 'void CATCH2_INTERNAL_TEST_0()':                                                                                                                           
/scratch/knoepfel/phlex-devel/srcs/phlex/phlex/metaprogramming/delegate.hpp:33:26: note: 'SR.11326' was declared here                                                                                                                               
   33 |     return std::function{[t = obj, f](Args... args) mutable -> R { return ((*t).*f)(args...); }};                                                                                                                                           
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                             
cc1plus: all warnings being treated as errors                                 

@knoepfel knoepfel force-pushed the silence-maybe-uninitialized-warning branch from 8e5eb1c to d74b85d Compare April 10, 2026 16:35
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@               Coverage Diff                @@
##           release/v0.2     #504      +/-   ##
================================================
- Coverage         85.43%   85.33%   -0.11%     
================================================
  Files               144      144              
  Lines              3591     3593       +2     
  Branches            615      615              
================================================
- Hits               3068     3066       -2     
- Misses              315      316       +1     
- Partials            208      211       +3     
Flag Coverage Δ
unittests 85.33% <100.00%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
phlex/metaprogramming/delegate.hpp 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c2a09bd...d74b85d. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sabasehrish sabasehrish merged commit 46f6bf3 into Framework-R-D:release/v0.2 Apr 10, 2026
36 checks passed
@knoepfel knoepfel deleted the silence-maybe-uninitialized-warning branch April 10, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants