From: Ivan Maidanski Date: Wed, 27 Sep 2017 08:22:18 +0000 (+0300) Subject: Eliminate 'non-null arg compared to null' warning in toggleref_add (GCC) X-Git-Tag: v7.6.2~61 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c78441cd5be32438c6830c76c324e1222ce7ee4;p=gc 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. --- 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)) {