unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: scratch/no-purespace 976196cba66 07/13: Pure storage removal: Replace calls to removed functions
       [not found] ` <20240820194248.35A31C1CAF2@vcs2.savannah.gnu.org>
@ 2024-08-21 20:03   ` Stefan Kangas
  2024-08-22  6:17     ` Pip Cet
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Kangas @ 2024-08-21 20:03 UTC (permalink / raw)
  To: Pip Cet, emacs-devel

Pip Cet via Mailing list for Emacs changes <emacs-diffs@gnu.org> writes:

> branch: scratch/no-purespace
> commit 976196cba66992bcc0aa581403f2d215136547d6
> Author: Pip Cet <pipcet@protonmail.com>
> Commit: Pip Cet <pipcet@protonmail.com>
>
>     Pure storage removal: Replace calls to removed functions

With clang, I get this warning now:

alloc.c:6706:13: warning: variable 'po' set but not used
[-Wunused-but-set-variable]
      void *po = XPNTR (obj);

The below seems to fix it, but maybe there's a cleaner fix:

diff --git a/src/alloc.c b/src/alloc.c
index 974fb14115f..ae40a7f6686 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6703,7 +6703,9 @@ process_mark_stack (ptrdiff_t base_sp)
     {
       Lisp_Object obj = mark_stack_pop ();
     mark_obj: ;
+#if GC_CHECK_MARKED_OBJECTS
       void *po = XPNTR (obj);
+#endif

 #if GC_REMEMBER_LAST_MARKED
       last_marked[last_marked_index++] = obj;
@@ -6950,7 +6952,11 @@ #define CHECK_ALLOCATED_AND_LIVE_SYMBOL()		((void) 0)
 	    set_string_marked (XSTRING (ptr->u.s.name));
 	    mark_interval_tree (string_intervals (ptr->u.s.name));
 	    /* Inner loop to mark next symbol in this bucket, if any.  */
+#if GC_CHECK_MARKED_OBJECTS
 	    po = ptr = ptr->u.s.next;
+#else
+	    ptr = ptr->u.s.next;
+#endif
 	    if (ptr)
 	      goto nextsym;
 	  }



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: scratch/no-purespace 976196cba66 07/13: Pure storage removal: Replace calls to removed functions
  2024-08-21 20:03   ` scratch/no-purespace 976196cba66 07/13: Pure storage removal: Replace calls to removed functions Stefan Kangas
@ 2024-08-22  6:17     ` Pip Cet
  0 siblings, 0 replies; 2+ messages in thread
From: Pip Cet @ 2024-08-22  6:17 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: emacs-devel

"Stefan Kangas" <stefankangas@gmail.com> writes:

> Pip Cet via Mailing list for Emacs changes <emacs-diffs@gnu.org> writes:
>
>> branch: scratch/no-purespace
>> commit 976196cba66992bcc0aa581403f2d215136547d6
>> Author: Pip Cet <pipcet@protonmail.com>
>> Commit: Pip Cet <pipcet@protonmail.com>
>>
>>     Pure storage removal: Replace calls to removed functions
>
> With clang, I get this warning now:
>
> alloc.c:6706:13: warning: variable 'po' set but not used
> [-Wunused-but-set-variable]
>       void *po = XPNTR (obj);

Thank you! Hopefully fixed now.

Pip




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-22  6:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <172418296207.12694.9697430583864173962@vcs2.savannah.gnu.org>
     [not found] ` <20240820194248.35A31C1CAF2@vcs2.savannah.gnu.org>
2024-08-21 20:03   ` scratch/no-purespace 976196cba66 07/13: Pure storage removal: Replace calls to removed functions Stefan Kangas
2024-08-22  6:17     ` Pip Cet

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).