Eliminate 'function result not used' code defect in GC_mark_local
authorIvan Maidanski <ivmai@mail.ru>
Wed, 16 Nov 2016 07:34:08 +0000 (10:34 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 16 Nov 2016 07:34:08 +0000 (10:34 +0300)
* mark.c (GC_mark_local): Explicitly cast AO_compare_and_swap result to
void (to outline that the result is unused intentionally).

mark.c

diff --git a/mark.c b/mark.c
index 06ed99c..f8928b3 100644 (file)
--- a/mark.c
+++ b/mark.c
@@ -1080,9 +1080,9 @@ STATIC void GC_mark_local(mse *local_mark_stack, int id)
         if ((word)my_first_nonempty < (word)global_first_nonempty) {
             my_first_nonempty = global_first_nonempty;
         } else if ((word)global_first_nonempty < (word)my_first_nonempty) {
-            AO_compare_and_swap(&GC_first_nonempty,
-                                (AO_t) global_first_nonempty,
-                                (AO_t) my_first_nonempty);
+            (void)AO_compare_and_swap(&GC_first_nonempty,
+                                      (AO_t)global_first_nonempty,
+                                      (AO_t)my_first_nonempty);
             /* If this fails, we just go ahead, without updating        */
             /* GC_first_nonempty.                                       */
         }