summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dbhelpers.c3
-rw-r--r--dbutil.c2
-rw-r--r--fuzz-wrapfd.c2
-rw-r--r--fuzz-wrapfd.h4
4 files changed, 6 insertions, 5 deletions
diff --git a/dbhelpers.c b/dbhelpers.c
index 08d21ae..ce5c379 100644
--- a/dbhelpers.c
+++ b/dbhelpers.c
@@ -9,8 +9,9 @@ void m_burn(void *data, unsigned int len) {
#elif defined(HAVE_EXPLICIT_BZERO)
explicit_bzero(data, len);
#else
+ /* This must be volatile to avoid compiler optimisation */
volatile void *p = data;
- memset((void*)p, 0x0, len);
+ memset((void*)p, 0x0, len);
#endif
}
diff --git a/dbutil.c b/dbutil.c
index 163ffd9..9f61a2b 100644
--- a/dbutil.c
+++ b/dbutil.c
@@ -687,6 +687,6 @@ void fsync_parent_dir(const char* fn) {
TRACE(("error opening directory %s for fsync: %s", dir, strerror(errno)))
}
- free(fn_dir);
+ m_free(fn_dir);
#endif
}
diff --git a/fuzz-wrapfd.c b/fuzz-wrapfd.c
index 6472189..39d2b62 100644
--- a/fuzz-wrapfd.c
+++ b/fuzz-wrapfd.c
@@ -26,7 +26,7 @@ static int wrap_used[IOWRAP_MAXFD+1];
static unsigned int nused;
static unsigned short rand_state[3];
-void wrapfd_setup() {
+void wrapfd_setup(void) {
TRACE(("wrapfd_setup"))
nused = 0;
memset(wrap_fds, 0x0, sizeof(wrap_fds));
diff --git a/fuzz-wrapfd.h b/fuzz-wrapfd.h
index 04477b9..7aed43a 100644
--- a/fuzz-wrapfd.h
+++ b/fuzz-wrapfd.h
@@ -7,10 +7,10 @@ enum wrapfd_mode {
UNUSED = 0,
PLAIN,
INPROGRESS,
- RANDOMIN,
+ RANDOMIN
};
-void wrapfd_setup();
+void wrapfd_setup(void);
void wrapfd_setseed(uint32_t seed);
// doesn't take ownership of buf. buf is optional.
void wrapfd_add(int fd, buffer *buf, enum wrapfd_mode mode);