aboutsummaryrefslogtreecommitdiff
path: root/src/test/test-memwipe.c
diff options
context:
space:
mode:
authorKris Katterjohn <katterjohn@gmail.com>2019-01-21 16:33:32 -0600
committerNick Mathewson <nickm@torproject.org>2019-02-19 11:38:32 -0500
commit4417ac880a7f1306574365fd9cf4da2a41ac14ef (patch)
tree3ae36ba36c5be096bf062c4b4624f290f605ebf0 /src/test/test-memwipe.c
parenta3f9ddcf033881ac78cda0aa7e6a9fd7195868cc (diff)
downloadtor-4417ac880a7f1306574365fd9cf4da2a41ac14ef.tar.gz
tor-4417ac880a7f1306574365fd9cf4da2a41ac14ef.zip
Fix a compiler warning on OpenBSD
malloc_options needs to be declared extern (and declaring it extern means we need to initialize it separately) Fixes bug 29145; bugfix on 0.2.9.3-alpha Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
Diffstat (limited to 'src/test/test-memwipe.c')
-rw-r--r--src/test/test-memwipe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test-memwipe.c b/src/test/test-memwipe.c
index fd6457416a..c650b99c85 100644
--- a/src/test/test-memwipe.c
+++ b/src/test/test-memwipe.c
@@ -39,7 +39,8 @@ const char *s = NULL;
#ifdef __OpenBSD__
/* Disable some of OpenBSD's malloc protections for this test. This helps
* us do bad things, such as access freed buffers, without crashing. */
-const char *malloc_options="sufjj";
+extern const char *malloc_options;
+const char *malloc_options = "sufjj";
#endif
static unsigned