From 8c4498e62ed58ac94cc627d2ab085f2b17abc090 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 23 May 2022 19:26:18 +0300 Subject: [PATCH] Avoid compiler warnings on macOS (bug#55595) * configure.ac: Don't use -Wunknown-pragmas with Clang. * src/comp.c (load_comp_unit): Avoid Clang compilation warning. --- configure.ac | 1 + src/comp.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 1d2d1f190bf..ed8ec890acb 100644 --- a/configure.ac +++ b/configure.ac @@ -1084,6 +1084,7 @@ AS_IF([test $gl_gcc_warnings = no], if test "$emacs_cv_clang" = yes; then nw="$nw -Wdouble-promotion" + nm="$nm -Wunknown-pragmas" fi # This causes too much noise in the MinGW build. diff --git a/src/comp.c b/src/comp.c index b01106c906f..2b9808aba62 100644 --- a/src/comp.c +++ b/src/comp.c @@ -5342,7 +5342,7 @@ load_comp_unit (struct Lisp_Native_Comp_Unit *comp_u, bool loading_dump, are necessary exclusively during the first load. Once these are collected we don't have to maintain them in the heap forever. */ - Lisp_Object volatile data_ephemeral_vec; + Lisp_Object volatile data_ephemeral_vec = Qnil; /* In case another load of the same CU is active on the stack all ephemeral data is hold by that frame. Re-writing 'data_ephemeral_vec' would be not only a waste of cycles but -- 2.39.2