diff options
| author | Pip Cet | 2024-08-22 05:49:33 +0000 |
|---|---|---|
| committer | Stefan Kangas | 2024-12-12 22:48:15 +0100 |
| commit | c951fd415cd243eeda3caf2e536967a762bd0ffe (patch) | |
| tree | 822eff2e6e84c0de6bd37e4645b36dcada2f9929 /src/alloc.c | |
| parent | 00a1152fad510d56cec813ba008f854cfceb163e (diff) | |
| download | emacs-c951fd415cd243eeda3caf2e536967a762bd0ffe.tar.gz emacs-c951fd415cd243eeda3caf2e536967a762bd0ffe.zip | |
Avoid compiler warning in process_mark_stack
* src/alloc.c (process_mark_stack): Only declare and assign to 'po' if
it's needed.
Problem reported by: Stefan Kangas <stefankangas@gmail.com>.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c index 8c8e1a99829..e557e82883c 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -6702,8 +6702,6 @@ process_mark_stack (ptrdiff_t base_sp) | |||
| 6702 | { | 6702 | { |
| 6703 | Lisp_Object obj = mark_stack_pop (); | 6703 | Lisp_Object obj = mark_stack_pop (); |
| 6704 | mark_obj: ; | 6704 | mark_obj: ; |
| 6705 | void *po = XPNTR (obj); | ||
| 6706 | |||
| 6707 | #if GC_REMEMBER_LAST_MARKED | 6705 | #if GC_REMEMBER_LAST_MARKED |
| 6708 | last_marked[last_marked_index++] = obj; | 6706 | last_marked[last_marked_index++] = obj; |
| 6709 | last_marked_index &= LAST_MARKED_SIZE - 1; | 6707 | last_marked_index &= LAST_MARKED_SIZE - 1; |
| @@ -6713,6 +6711,7 @@ process_mark_stack (ptrdiff_t base_sp) | |||
| 6713 | we encounter an object we know is bogus. This increases GC time | 6711 | we encounter an object we know is bogus. This increases GC time |
| 6714 | by ~80%. */ | 6712 | by ~80%. */ |
| 6715 | #if GC_CHECK_MARKED_OBJECTS | 6713 | #if GC_CHECK_MARKED_OBJECTS |
| 6714 | void *po = XPNTR (obj); | ||
| 6716 | 6715 | ||
| 6717 | /* Check that the object pointed to by PO is known to be a Lisp | 6716 | /* Check that the object pointed to by PO is known to be a Lisp |
| 6718 | structure allocated from the heap. */ | 6717 | structure allocated from the heap. */ |
| @@ -6949,7 +6948,10 @@ process_mark_stack (ptrdiff_t base_sp) | |||
| 6949 | set_string_marked (XSTRING (ptr->u.s.name)); | 6948 | set_string_marked (XSTRING (ptr->u.s.name)); |
| 6950 | mark_interval_tree (string_intervals (ptr->u.s.name)); | 6949 | mark_interval_tree (string_intervals (ptr->u.s.name)); |
| 6951 | /* Inner loop to mark next symbol in this bucket, if any. */ | 6950 | /* Inner loop to mark next symbol in this bucket, if any. */ |
| 6952 | po = ptr = ptr->u.s.next; | 6951 | ptr = ptr->u.s.next; |
| 6952 | #if GC_CHECK_MARKED_OBJECTS | ||
| 6953 | po = ptr; | ||
| 6954 | #endif | ||
| 6953 | if (ptr) | 6955 | if (ptr) |
| 6954 | goto nextsym; | 6956 | goto nextsym; |
| 6955 | } | 6957 | } |