Skip to content

Commit 2a144c5

Browse files
ask valgrind explicitly
1 parent 8518fcd commit 2a144c5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ci/ci.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ esac
9090

9191
# We have set "-j<n>" in MAKEFLAGS.
9292
build_exit_code=0
93-
make > make.log 2>&1 || build_exit_code=$?
93+
make CFLAGS="-Wno-error" > make.log 2>&1 || build_exit_code=$?
9494
cat make.log
9595
if [ $build_exit_code -ne 0 ]; then
9696
case "${CC:-undefined}" in

examples/silentpayments.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <stdio.h>
1010
#include <assert.h>
1111
#include <string.h>
12+
#include <valgrind/memcheck.h>
1213

1314
#include <secp256k1_extrakeys.h>
1415
#include <secp256k1_silentpayments.h>
@@ -100,7 +101,7 @@ const unsigned char* label_lookup(
100101
) {
101102
const struct labels_cache* cache = (const struct labels_cache*)cache_ptr;
102103
size_t i;
103-
for (i = 0; i < cache->entries_used; i++) {
104+
for (i = 0; i < cache->entries_used; i++) {printf("lhs: %lu\n", VALGRIND_CHECK_MEM_IS_DEFINED(&cache->entries[i], sizeof(struct label_cache_entry))); printf("rhs: %lu\n", VALGRIND_CHECK_MEM_IS_DEFINED(label33, 33));
104105
if (memcmp(cache->entries[i].label, label33, 33) == 0) {
105106
return cache->entries[i].label_tweak;
106107
}

0 commit comments

Comments
 (0)