]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a compiler warning on OpenBSD
authorKris Katterjohn <katterjohn@gmail.com>
Mon, 21 Jan 2019 22:33:32 +0000 (16:33 -0600)
committerNick Mathewson <nickm@torproject.org>
Tue, 19 Feb 2019 16:38:32 +0000 (11:38 -0500)
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>
changes/bug29145 [new file with mode: 0644]
src/test/test-memwipe.c

diff --git a/changes/bug29145 b/changes/bug29145
new file mode 100644 (file)
index 0000000..40d3da4
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes (compilation, testing):
+    - Silence a compiler warning in test-memwipe.c on OpenBSD.  Fixes
+      bug 29145; bugfix on 0.2.9.3-alpha.  Patch from Kris Katterjohn.
index fd6457416aee5865aa9c036ee3828eb9b3012d49..c650b99c85ff1f29b1ad648b8ecdb25a7b7f6ab0 100644 (file)
@@ -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