File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,15 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])],
82
82
CFLAGS="$saved_CFLAGS"
83
83
] )
84
84
85
+ saved_CFLAGS="$CFLAGS"
86
+ CFLAGS="-Wconditional-uninitialized $CFLAGS"
87
+ AC_MSG_CHECKING ( [ if ${CC} supports -Wconditional-uninitialized] )
88
+ AC_COMPILE_IFELSE ( [ AC_LANG_SOURCE ( [ [ char foo;] ] ) ] ,
89
+ [ AC_MSG_RESULT ( [ yes] ) ] ,
90
+ [ AC_MSG_RESULT ( [ no] )
91
+ CFLAGS="$saved_CFLAGS"
92
+ ] )
93
+
85
94
saved_CFLAGS="$CFLAGS"
86
95
CFLAGS="-fvisibility=hidden $CFLAGS"
87
96
AC_MSG_CHECKING ( [ if ${CC} supports -fvisibility=hidden] )
Original file line number Diff line number Diff line change @@ -4526,8 +4526,10 @@ void test_ecdsa_sign_verify(void) {
4526
4526
secp256k1_scalar one ;
4527
4527
secp256k1_scalar msg , key ;
4528
4528
secp256k1_scalar sigr , sigs ;
4529
- int recid ;
4530
4529
int getrec ;
4530
+ /* Initialize recid to suppress a false positive -Wconditional-uninitialized in clang.
4531
+ VG_UNDEF ensures that valgrind will still treat the variable as uninitialized. */
4532
+ int recid = -1 ; VG_UNDEF (& recid , sizeof (recid ));
4531
4533
random_scalar_order_test (& msg );
4532
4534
random_scalar_order_test (& key );
4533
4535
secp256k1_ecmult_gen (& ctx -> ecmult_gen_ctx , & pubj , & key );
You can’t perform that action at this time.
0 commit comments