Skip to content

Commit

Permalink
Fix a compiler warning on OpenBSD
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rettakjak authored and nmathewson committed Feb 19, 2019
1 parent a3f9ddc commit 4417ac8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions 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.
3 changes: 2 additions & 1 deletion src/test/test-memwipe.c
Expand Up @@ -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
Expand Down

0 comments on commit 4417ac8

Please sign in to comment.