From 6c78441cd5be32438c6830c76c324e1222ce7ee4 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 27 Sep 2017 11:22:18 +0300 Subject: [PATCH] Eliminate 'non-null arg compared to null' warning in toggleref_add (GCC) (fix commit 86991cb) * finalize.c [!GC_TOGGLE_REFS_NOT_NEEDED] (GC_toggleref_add): Use NONNULL_ARG_NOT_NULL to check pointer argument marked as non-null (in the function declaration) is actually non-null. --- finalize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/finalize.c b/finalize.c index bd297a9c..bb607e07 100644 --- a/finalize.c +++ b/finalize.c @@ -426,7 +426,7 @@ GC_API int GC_CALL GC_unregister_disappearing_link(void * * link) int res = GC_SUCCESS; DCL_LOCK_STATE; - GC_ASSERT(obj != NULL); + GC_ASSERT(NONNULL_ARG_NOT_NULL(obj)); LOCK(); if (GC_toggleref_callback != 0) { if (!ensure_toggleref_capacity(1)) { -- 2.40.0