Pacify gcc -Wmissing-variable-declarations

This is a new warning diagnostic in GCC 14.
* lib-src/etags.c (mercury_heuristics_ratio):
* src/pgtkselect.c, src/xselect.c (selection_request_stack):
* src/xselect.c (outstanding_transfers):
* src/xterm.c (pending_selection_requests)
(x_dnd_waiting_for_motif_finish_display):
Now static.
* lib-src/make-docfile.c (close_emacs_globals):
Arrange for lispsym to be declared with extern first,
when compiling lread.c.
* src/alloc.c (gdb_make_enums_visible) [__GNUC__]:
* src/emacs.c (RCS_Id):
* src/keyboard.c (stop_character):
* src/print.c (print_output_debug_flag):
Now declared with extern first.
* src/lisp.h (DEFINE_GDB_SYMBOL_BEGIN) [MAIN_PROGRAM]:
Arrange for ID to be declared extern first.
* src/lisp.h (garbage_collection_inhibited):
* src/xterm.h (x_frame_parm_handlers):
Declare here, so that its interface is properly checked.  Other decls
removed.
This commit is contained in:
Paul Eggert 2024-05-04 10:08:48 -07:00
parent 7ae091d933
commit 99a5c75f3b
12 changed files with 21 additions and 18 deletions

View file

@ -705,7 +705,7 @@ and optionally Prolog-like definitions (first rule for a predicate or \
function).\n\
To enable this behavior, run etags using --declarations.";
static bool with_mercury_definitions = false;
float mercury_heuristics_ratio = MERCURY_HEURISTICS_RATIO;
static float mercury_heuristics_ratio = MERCURY_HEURISTICS_RATIO;
static const char *Objc_suffixes [] =
{ "lm", /* Objective lex file */

View file

@ -660,11 +660,11 @@ close_emacs_globals (ptrdiff_t num_symbols)
printf (("};\n"
"extern struct emacs_globals globals;\n"
"\n"
"#ifndef DEFINE_SYMBOLS\n"
"extern\n"
"#endif\n"
"struct Lisp_Symbol lispsym[%td];\n"),
num_symbols);
"extern struct Lisp_Symbol lispsym[%td];\n"
"#ifdef DEFINE_SYMBOLS\n"
"struct Lisp_Symbol lispsym[%td];\n"
"#endif\n"),
num_symbols, num_symbols);
}
static void