From: Lianbo Jiang <liji...@redhat.com>

Without the patch:

  tools.c: In function ‘drop_core’:
  tools.c:6251:23: error: expected identifier or ‘(’ before ‘nullptr’
   6251 |         volatile int *nullptr;
        |                       ^~~~~~~
  tools.c:6259:17: error: lvalue required as left operand of assignment
   6259 |         nullptr = NULL;
        |                 ^
  tools.c:6261:21: error: invalid type argument of unary ‘*’ (have ‘typeof 
(nullptr)’)
   6261 |                 i = *nullptr;
        |                     ^~~~~~~~
  make[6]: *** [Makefile:345: tools.o] Error 1

Note: this was observed on gcc version 15.0.1

Signed-off-by: Lianbo Jiang <liji...@redhat.com>
---
 tools.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools.c b/tools.c
index 85d8b6f..c9305be 100644
--- a/tools.c
+++ b/tools.c
@@ -6248,7 +6248,7 @@ lowest_bit_long(ulong val)
 void
 drop_core(char *s)
 {
-       volatile int *nullptr;
+       volatile int *ptr;
        int i ATTRIBUTE_UNUSED;
 
        if (s && ascii_string(s))
@@ -6256,9 +6256,9 @@ drop_core(char *s)
 
        kill((pid_t)pc->program_pid, 3);
 
-       nullptr = NULL;
+       ptr = NULL;
        while (TRUE)
-               i = *nullptr;
+               i = *ptr;
 }
 
 
-- 
2.47.0
--
Crash-utility mailing list -- devel@lists.crash-utility.osci.io
To unsubscribe send an email to devel-le...@lists.crash-utility.osci.io
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki

Reply via email to