From 73965631dca5ba584b29a0178defb766c286bab6 Mon Sep 17 00:00:00 2001 From: Timothy Simpson Date: Tue, 10 Sep 2024 13:41:52 +0100 Subject: [PATCH] Fix potential uninitialized usage warnings in common test app code --- FindQwt.cmake | 2 ++ test/common.h | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/FindQwt.cmake b/FindQwt.cmake index 2c490d2..515323e 100644 --- a/FindQwt.cmake +++ b/FindQwt.cmake @@ -21,6 +21,7 @@ find_library(QWT_LIBRARY /usr/local/opt/qwt-qt5/lib /usr/local/lib /usr/local/lib/qt5 + "$ENV{QWT_DIR}/lib" "$ENV{LIB_DIR}/lib" "$ENV{LIB}" ) @@ -37,6 +38,7 @@ FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS /usr/local/opt/qwt-qt5/include /usr/local/include /usr/local/include/qt5 + "$ENV{QWT_DIR}/src" "$ENV{LIB_DIR}/include" "$ENV{INCLUDE}" PATH_SUFFIXES qwt-qt5 qwt qwt6 qt5/qwt diff --git a/test/common.h b/test/common.h index 120f398..87bb4b1 100644 --- a/test/common.h +++ b/test/common.h @@ -66,19 +66,19 @@ void generate_ut(std::mt19937& mt, std::mt19937::result_type recursion_limit, te break; } case 2: { - test::BasicTypes bt; + test::BasicTypes bt{}; ut.bt(bt); generate_bt(mt, recursion_limit, ut.bt()); break; } case 3: { - test::BasicTypesSeq bts; + test::BasicTypesSeq bts{}; ut.bts(bts); generate_bts(mt, recursion_limit, ut.bts()); break; } case 4: { - test::BasicTypesSeqSeq btss; + test::BasicTypesSeqSeq btss{}; ut.btss(btss); generate_btss(mt, recursion_limit, ut.btss()); break; @@ -121,19 +121,19 @@ void generate_cut(std::mt19937& mt, std::mt19937::result_type recursion_limit, t break; } case 2: { - test::UnionType ut; + test::UnionType ut{}; cut.ut(ut); generate_ut(mt, recursion_limit, cut.ut()); break; } case 3: { - test::TreeNode tn; + test::TreeNode tn{}; cut.tn(tn); generate_tn(mt, recursion_limit, cut.tn()); break; } case 4: { - test::TreeNodeSeq tns; + test::TreeNodeSeq tns{}; cut.tns(tns); generate_tns(mt, recursion_limit, cut.tns()); break;