From 38962c655d8a095393a3690b7a88594849aba0f0 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 25 Jun 2019 23:55:22 +0300 Subject: [PATCH] Fix 'GC_debug_header_size is deprecated' GCC warning (fix of commit 85e3083ff) * include/private/gc_priv.h [!GC_BUILD && NOT_GCBUILD] (GC_BUILD): Do not define. * tests/disclaim_bench.c (NOT_GCBUILD): Define macro (before include gc_priv.h); remove outdated comment. * tests/test.c (NOT_GCBUILD): Likewise. --- include/private/gc_priv.h | 2 +- tests/disclaim_bench.c | 3 +-- tests/test.c | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index 27fc21b2..1124a80f 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -22,7 +22,7 @@ # include "config.h" #endif -#ifndef GC_BUILD +#if !defined(GC_BUILD) && !defined(NOT_GCBUILD) # define GC_BUILD #endif diff --git a/tests/disclaim_bench.c b/tests/disclaim_bench.c index 28feb1a5..53de3059 100644 --- a/tests/disclaim_bench.c +++ b/tests/disclaim_bench.c @@ -22,8 +22,7 @@ #include "gc_disclaim.h" -/* Include gc_priv.h is done after including GC public headers, so */ -/* that GC_BUILD has no effect on the public prototypes. */ +#define NOT_GCBUILD #include "private/gc_priv.h" /* for CLOCK_TYPE, COVERT_DATAFLOW, GC_random */ #ifdef LINT2 diff --git a/tests/test.c b/tests/test.c index 79c8d4da..f6b69d2c 100644 --- a/tests/test.c +++ b/tests/test.c @@ -61,6 +61,7 @@ # include "gc_typed.h" #endif +#define NOT_GCBUILD #include "private/gc_priv.h" /* For output, locking, */ /* some statistics and gcconfig.h. */ -- 2.50.1