From 7f8dbf70a5b0a61345b458537b1a7b4febf468fc Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sat, 13 Jun 2020 14:39:49 +0200 Subject: [PATCH] Fix const qualifier warnings * src/lisp.h (struct Lisp_Subr): Remove const qualifier from 'native_c_name'. * src/alloc.c (cleanup_vector): Cast to discard const qualifier. --- src/alloc.c | 4 +++- src/lisp.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/alloc.c b/src/alloc.c index 514810b83fa..42a53276bc8 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -3163,7 +3163,9 @@ cleanup_vector (struct Lisp_Vector *vector) PSEUDOVEC_STRUCT (vector, Lisp_Subr); if (!NILP (subr->native_comp_u[0])) { - xfree (subr->symbol_name); + /* FIXME Alternative and non invasive solution to this + cast? */ + xfree ((char *)subr->symbol_name); xfree (subr->native_c_name[0]); } } diff --git a/src/lisp.h b/src/lisp.h index 55055fe284a..bef2e8079e1 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2095,7 +2095,7 @@ struct Lisp_Subr }; EMACS_INT doc; Lisp_Object native_comp_u[NATIVE_COMP_FLAG]; - const char *native_c_name[NATIVE_COMP_FLAG]; + char *native_c_name[NATIVE_COMP_FLAG]; } GCALIGNED_STRUCT; union Aligned_Lisp_Subr { -- 2.39.5