From: Andrea Corallo Date: Sat, 13 Jun 2020 12:39:49 +0000 (+0200) Subject: Fix const qualifier warnings X-Git-Tag: emacs-28.0.90~2727^2~566 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7f8dbf70a5b0a61345b458537b1a7b4febf468fc;p=emacs.git 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. --- 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 {