Skip to content

Commit

Permalink
Fix compile error on GCC 10 (Fedora 32)
Browse files Browse the repository at this point in the history
GCC 10 complains about the unused variable called "unused"

Adding `extern` to the declarations fixes the error.

Fixes #301
  • Loading branch information
FreedomBen authored and mptre committed Apr 27, 2020
1 parent 516946b commit 160d7be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compat-pledge.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "config.h"

int unused;
extern int unused;

#ifndef HAVE_PLEDGE

Expand Down
2 changes: 1 addition & 1 deletion compat-reallocarray.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "config.h"

int unused;
extern int unused;

#ifndef HAVE_REALLOCARRAY

Expand Down
2 changes: 1 addition & 1 deletion compat-strtonum.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "config.h"

int unused;
extern int unused;

#ifndef HAVE_STRTONUM

Expand Down

0 comments on commit 160d7be

Please sign in to comment.