From f985d639aac63980078fce3ab23013f4bfdc7eb0 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 12 Jun 2024 16:47:27 +0300 Subject: [PATCH] Eliminate 'different const qualifiers' MSVC warnings in GC_noop1_ptr calls (fix of commit f9b4b1907) Issue #627 (bdwgc). * include/gc/gc.h (GC_noop1_ptr): Change argument type from volatile void* to const volatile void*. * mark.c (GC_noop1_ptr): Likewise. --- include/gc/gc.h | 2 +- mark.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/gc/gc.h b/include/gc/gc.h index 471c3b438..dff8c833e 100644 --- a/include/gc/gc.h +++ b/include/gc/gc.h @@ -1531,7 +1531,7 @@ GC_API int GC_CALL GC_invoke_finalizers(void); GC_API void GC_CALL GC_noop1(GC_word); /* Same as GC_noop1() but for a pointer. */ -GC_API void GC_CALL GC_noop1_ptr(volatile void *); +GC_API void GC_CALL GC_noop1_ptr(const volatile void *); /* GC_set_warn_proc can be used to redirect or filter warning messages. */ /* p may not be a NULL pointer. msg is printf format string (arg must */ diff --git a/mark.c b/mark.c index 207abe4e4..4ef5cbb04 100644 --- a/mark.c +++ b/mark.c @@ -48,7 +48,7 @@ GC_API void GC_CALL GC_noop1(GC_word x) # endif } -GC_API void GC_CALL GC_noop1_ptr(volatile void *p) +GC_API void GC_CALL GC_noop1_ptr(const volatile void *p) { GC_noop1(ADDR(p)); }