[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/release-0.3.4] Fix a compiler warning on OpenBSD



commit 4417ac880a7f1306574365fd9cf4da2a41ac14ef
Author: Kris Katterjohn <katterjohn@xxxxxxxxx>
Date:   Mon Jan 21 16:33:32 2019 -0600

    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@xxxxxxxxx>
---
 changes/bug29145        | 3 +++
 src/test/test-memwipe.c | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/changes/bug29145 b/changes/bug29145
new file mode 100644
index 000000000..40d3da4b9
--- /dev/null
+++ b/changes/bug29145
@@ -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.
diff --git a/src/test/test-memwipe.c b/src/test/test-memwipe.c
index fd6457416..c650b99c8 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



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits