aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2024-05-04 10:08:48 -0700
committerPaul Eggert2024-05-11 18:46:27 -0700
commit99a5c75f3b0916affdc8ea4a25d4bc87e67bca88 (patch)
tree5839ee36d6cef64fc2e21224f56a60c568acdc54 /src
parent7ae091d933b03d0a1e1e0b39a949c2811c4c3618 (diff)
downloademacs-99a5c75f3b0916affdc8ea4a25d4bc87e67bca88.tar.gz
emacs-99a5c75f3b0916affdc8ea4a25d4bc87e67bca88.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/alloc.c5
-rw-r--r--src/emacs.c1
-rw-r--r--src/keyboard.c1
-rw-r--r--src/lisp.h4
-rw-r--r--src/pgtkselect.c2
-rw-r--r--src/print.c1
-rw-r--r--src/xdisp.c2
-rw-r--r--src/xselect.c4
-rw-r--r--src/xterm.c6
-rw-r--r--src/xterm.h1
10 files changed, 15 insertions, 12 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 4226cb1d1a0..28e32554472 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -8338,7 +8338,7 @@ enum defined_HAVE_PGTK { defined_HAVE_PGTK = false };
8338 then xbacktrace could fail. Similarly for the other enums and 8338 then xbacktrace could fail. Similarly for the other enums and
8339 their values. Some non-GCC compilers don't like these constructs. */ 8339 their values. Some non-GCC compilers don't like these constructs. */
8340#ifdef __GNUC__ 8340#ifdef __GNUC__
8341union 8341extern union enums_for_gdb
8342{ 8342{
8343 enum CHARTAB_SIZE_BITS CHARTAB_SIZE_BITS; 8343 enum CHARTAB_SIZE_BITS CHARTAB_SIZE_BITS;
8344 enum char_table_specials char_table_specials; 8344 enum char_table_specials char_table_specials;
@@ -8353,5 +8353,6 @@ union
8353 enum pvec_type pvec_type; 8353 enum pvec_type pvec_type;
8354 enum defined_HAVE_X_WINDOWS defined_HAVE_X_WINDOWS; 8354 enum defined_HAVE_X_WINDOWS defined_HAVE_X_WINDOWS;
8355 enum defined_HAVE_PGTK defined_HAVE_PGTK; 8355 enum defined_HAVE_PGTK defined_HAVE_PGTK;
8356} const EXTERNALLY_VISIBLE gdb_make_enums_visible = {0}; 8356} const gdb_make_enums_visible;
8357union enums_for_gdb const EXTERNALLY_VISIBLE gdb_make_enums_visible = {0};
8357#endif /* __GNUC__ */ 8358#endif /* __GNUC__ */
diff --git a/src/emacs.c b/src/emacs.c
index 22da39a4d1c..58c751eaa6a 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -166,6 +166,7 @@ static const char emacs_copyright[] = COPYRIGHT;
166static const char emacs_bugreport[] = PACKAGE_BUGREPORT; 166static const char emacs_bugreport[] = PACKAGE_BUGREPORT;
167 167
168/* Put version info into the executable in the form that 'ident' uses. */ 168/* Put version info into the executable in the form that 'ident' uses. */
169extern char const RCS_Id[];
169char const EXTERNALLY_VISIBLE RCS_Id[] 170char const EXTERNALLY_VISIBLE RCS_Id[]
170 = "$Id" ": GNU Emacs " PACKAGE_VERSION 171 = "$Id" ": GNU Emacs " PACKAGE_VERSION
171 " (" EMACS_CONFIGURATION " " EMACS_CONFIG_FEATURES ") $"; 172 " (" EMACS_CONFIGURATION " " EMACS_CONFIG_FEATURES ") $";
diff --git a/src/keyboard.c b/src/keyboard.c
index bd1bb3bb4be..2995b3f906c 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3650,6 +3650,7 @@ readable_events (int flags)
3650} 3650}
3651 3651
3652/* Set this for debugging, to have a way to get out */ 3652/* Set this for debugging, to have a way to get out */
3653extern int stop_character;
3653int stop_character EXTERNALLY_VISIBLE; 3654int stop_character EXTERNALLY_VISIBLE;
3654 3655
3655static KBOARD * 3656static KBOARD *
diff --git a/src/lisp.h b/src/lisp.h
index 010d63e4dd9..41f8af35e8a 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -55,7 +55,8 @@ INLINE_HEADER_BEGIN
55 55
56#define DECLARE_GDB_SYM(type, id) type const id EXTERNALLY_VISIBLE 56#define DECLARE_GDB_SYM(type, id) type const id EXTERNALLY_VISIBLE
57#ifdef MAIN_PROGRAM 57#ifdef MAIN_PROGRAM
58# define DEFINE_GDB_SYMBOL_BEGIN(type, id) DECLARE_GDB_SYM (type, id) 58# define DEFINE_GDB_SYMBOL_BEGIN(type, id) \
59 extern DECLARE_GDB_SYM (type, id); DECLARE_GDB_SYM (type, id)
59# define DEFINE_GDB_SYMBOL_END(id) = id; 60# define DEFINE_GDB_SYMBOL_END(id) = id;
60#else 61#else
61# define DEFINE_GDB_SYMBOL_BEGIN(type, id) extern DECLARE_GDB_SYM (type, id) 62# define DEFINE_GDB_SYMBOL_BEGIN(type, id) extern DECLARE_GDB_SYM (type, id)
@@ -4435,6 +4436,7 @@ extern void parse_str_as_multibyte (const unsigned char *, ptrdiff_t,
4435 ptrdiff_t *, ptrdiff_t *); 4436 ptrdiff_t *, ptrdiff_t *);
4436 4437
4437/* Defined in alloc.c. */ 4438/* Defined in alloc.c. */
4439extern intptr_t garbage_collection_inhibited;
4438extern void *my_heap_start (void); 4440extern void *my_heap_start (void);
4439extern void check_pure_size (void); 4441extern void check_pure_size (void);
4440unsigned char *resize_string_data (Lisp_Object, ptrdiff_t, int, int); 4442unsigned char *resize_string_data (Lisp_Object, ptrdiff_t, int, int);
diff --git a/src/pgtkselect.c b/src/pgtkselect.c
index b0ab15c6069..271411b87ca 100644
--- a/src/pgtkselect.c
+++ b/src/pgtkselect.c
@@ -353,7 +353,7 @@ struct pgtk_selection_request
353/* Stack of selections currently being processed. 353/* Stack of selections currently being processed.
354 NULL if all requests have been fully processed. */ 354 NULL if all requests have been fully processed. */
355 355
356struct pgtk_selection_request *selection_request_stack; 356static struct pgtk_selection_request *selection_request_stack;
357 357
358static void 358static void
359pgtk_push_current_selection_request (struct selection_input_event *se, 359pgtk_push_current_selection_request (struct selection_input_event *se,
diff --git a/src/print.c b/src/print.c
index 612d63b7e94..7aacd2b2e90 100644
--- a/src/print.c
+++ b/src/print.c
@@ -90,6 +90,7 @@ static ptrdiff_t print_number_index;
90static void print_interval (INTERVAL interval, void *pprintcharfun); 90static void print_interval (INTERVAL interval, void *pprintcharfun);
91 91
92/* GDB resets this to zero on W32 to disable OutputDebugString calls. */ 92/* GDB resets this to zero on W32 to disable OutputDebugString calls. */
93extern bool print_output_debug_flag;
93bool print_output_debug_flag EXTERNALLY_VISIBLE = 1; 94bool print_output_debug_flag EXTERNALLY_VISIBLE = 1;
94 95
95 96
diff --git a/src/xdisp.c b/src/xdisp.c
index a7cae804006..4b7d7e02c68 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13195,8 +13195,6 @@ truncate_message_1 (void *a1, Lisp_Object a2)
13195 return false; 13195 return false;
13196} 13196}
13197 13197
13198extern intptr_t garbage_collection_inhibited;
13199
13200/* Set the current message to STRING. */ 13198/* Set the current message to STRING. */
13201 13199
13202static void 13200static void
diff --git a/src/xselect.c b/src/xselect.c
index fd0f06eeed9..6578358adc0 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -562,12 +562,12 @@ struct x_selection_request
562/* Stack of selections currently being processed. 562/* Stack of selections currently being processed.
563 NULL if all requests have been fully processed. */ 563 NULL if all requests have been fully processed. */
564 564
565struct x_selection_request *selection_request_stack; 565static struct x_selection_request *selection_request_stack;
566 566
567/* List of all outstanding selection transfers which are currently 567/* List of all outstanding selection transfers which are currently
568 being processed. */ 568 being processed. */
569 569
570struct transfer outstanding_transfers; 570static struct transfer outstanding_transfers;
571 571
572/* A counter for selection serials. */ 572/* A counter for selection serials. */
573 573
diff --git a/src/xterm.c b/src/xterm.c
index 33ef18d8da5..11ef9a4bd94 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -971,7 +971,7 @@ struct x_selection_request_event
971 selection requests inside long-lasting modal event loops, such as 971 selection requests inside long-lasting modal event loops, such as
972 the drag-and-drop loop. */ 972 the drag-and-drop loop. */
973 973
974struct x_selection_request_event *pending_selection_requests; 974static struct x_selection_request_event *pending_selection_requests;
975 975
976struct x_atom_ref 976struct x_atom_ref
977{ 977{
@@ -1274,7 +1274,7 @@ static int x_dnd_waiting_for_motif_finish;
1274 1274
1275/* The display the Motif drag receiver will send response data 1275/* The display the Motif drag receiver will send response data
1276 from. */ 1276 from. */
1277struct x_display_info *x_dnd_waiting_for_motif_finish_display; 1277static struct x_display_info *x_dnd_waiting_for_motif_finish_display;
1278 1278
1279/* Whether or not F1 was pressed during the drag-and-drop operation. 1279/* Whether or not F1 was pressed during the drag-and-drop operation.
1280 1280
@@ -31921,8 +31921,6 @@ x_activate_timeout_atimer (void)
31921 31921
31922/* Set up use of X before we make the first connection. */ 31922/* Set up use of X before we make the first connection. */
31923 31923
31924extern frame_parm_handler x_frame_parm_handlers[];
31925
31926static struct redisplay_interface x_redisplay_interface = 31924static struct redisplay_interface x_redisplay_interface =
31927 { 31925 {
31928 x_frame_parm_handlers, 31926 x_frame_parm_handlers,
diff --git a/src/xterm.h b/src/xterm.h
index 437ef281b0c..bf402de326b 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1727,6 +1727,7 @@ SELECTION_EVENT_DISPLAY (struct selection_input_event *ev)
1727 1727
1728/* From xfns.c. */ 1728/* From xfns.c. */
1729 1729
1730extern frame_parm_handler x_frame_parm_handlers[];
1730extern void x_free_gcs (struct frame *); 1731extern void x_free_gcs (struct frame *);
1731extern void x_relative_mouse_position (struct frame *, int *, int *); 1732extern void x_relative_mouse_position (struct frame *, int *, int *);
1732extern void x_real_pos_and_offsets (struct frame *, int *, int *, int *, 1733extern void x_real_pos_and_offsets (struct frame *, int *, int *, int *,