Skip to content

Commit

Permalink
Eliminate 'different const qualifiers' MSVC warnings in GC_noop1_ptr …
Browse files Browse the repository at this point in the history
…calls

(fix of commit f9b4b19)

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.
  • Loading branch information
ivmai committed Jun 12, 2024
1 parent 85d103c commit f985d63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/gc/gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion mark.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit f985d63

Please sign in to comment.