Fix C conformance issue in LISPSYM_INITIALLY
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 28 Jan 2024 08:15:38 +0000 (00:15 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 28 Jan 2024 08:26:44 +0000 (00:26 -0800)
* src/lisp.h (LISPSYM_INITIALLY): Remove unnecessary cast to char *.
The C standard allows but does not require support for casts to
pointers in constant expressions in static initializers.

src/lisp.h

index c2dfd1afad5136ea3c2ab5b8bff03f930a8fb71c..eb78176aed6392506fb6b39599d547d82e4b5558 100644 (file)
@@ -938,7 +938,7 @@ typedef EMACS_UINT Lisp_Word_tag;
 /* LISPSYM_INITIALLY (Qfoo) is equivalent to Qfoo except it is
    designed for use as an initializer, even for a constant initializer.  */
 #define LISPSYM_INITIALLY(name) \
-  TAG_PTR (Lisp_Symbol, (char *) (intptr_t) ((i##name) * sizeof *lispsym))
+  TAG_PTR (Lisp_Symbol, (intptr_t) ((i##name) * sizeof *lispsym))
 
 /* Declare extern constants for Lisp symbols.  These can be helpful
    when using a debugger like GDB, on older platforms where the debug