summaryrefslogtreecommitdiff
path: root/alloc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2018-03-01 11:44:07 +0300
committerIvan Maidanski <ivmai@mail.ru>2018-03-01 11:44:07 +0300
commit0b5f51b60de5539b3915461ce1618a2cf921e7d5 (patch)
tree77351f1a11e4e14fda348a189644fa1bc0e3643a /alloc.c
parentf30a26d5e335be3b84920e2b360b4d09ef83e447 (diff)
downloadbdwgc-0b5f51b60de5539b3915461ce1618a2cf921e7d5.tar.gz
Eliminate 'unused const variable' Clang warning for copyright and version
Issue #206 (bdwgc). * alloc.c (GC_copyright): Declare (inside EXTERN_C_BEGIN/END) before the definition. * alloc.c [!GC_NO_VERSION_VAR] (GC_version): Likewise.
Diffstat (limited to 'alloc.c')
-rw-r--r--alloc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/alloc.c b/alloc.c
index 43a7d24f..abdfebec 100644
--- a/alloc.c
+++ b/alloc.c
@@ -115,6 +115,9 @@ STATIC GC_bool GC_need_full_gc = FALSE;
STATIC word GC_used_heap_size_after_full = 0;
/* GC_copyright symbol is externally visible. */
+EXTERN_C_BEGIN
+extern const char * const GC_copyright[];
+EXTERN_C_END
const char * const GC_copyright[] =
{"Copyright 1988,1989 Hans-J. Boehm and Alan J. Demers ",
"Copyright (c) 1991-1995 by Xerox Corporation. All rights reserved. ",
@@ -127,6 +130,9 @@ const char * const GC_copyright[] =
/* Version macros are now defined in gc_version.h, which is included by */
/* gc.h, which is included by gc_priv.h. */
#ifndef GC_NO_VERSION_VAR
+ EXTERN_C_BEGIN
+ extern const unsigned GC_version;
+ EXTERN_C_END
const unsigned GC_version = ((GC_VERSION_MAJOR << 16) |
(GC_VERSION_MINOR << 8) | GC_VERSION_MICRO);
#endif