From 43c35278d4bf6c514aa8aac19f20e2c66d5eba92 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 13 Jun 2024 06:59:56 +0300 Subject: [PATCH] Revert "Eliminate 'different const qualifiers' MSVC warnings in noop1_ptr" Issue #627 (bdwgc). This reverts commit f985d639aac63980078fce3ab23013f4bfdc7eb0. Reason: GC_noop1_ptr() should not tell the compiler that the argument is a const pointer. --- 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 3e744e433..9ecfb9e5a 100644 --- a/include/gc/gc.h +++ b/include/gc/gc.h @@ -1530,7 +1530,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(const volatile void *); +GC_API void GC_CALL GC_noop1_ptr(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 4ef5cbb04..207abe4e4 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(const volatile void *p) +GC_API void GC_CALL GC_noop1_ptr(volatile void *p) { GC_noop1(ADDR(p)); }