all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Cleaning up for -Wredundant-decls
@ 2014-06-17  9:02 Dmitry Antipov
  2014-06-17 16:20 ` Paul Eggert
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Antipov @ 2014-06-17  9:02 UTC (permalink / raw)
  To: Emacs development discussions; +Cc: Paul Eggert

[-- Attachment #1: Type: text/plain, Size: 639 bytes --]

Since it's quite typical for a mature project to have global namespace polluted
with old unused and duplicated declarations, I would like to enable -Wredundant-decls
when --enable-gcc-warnings is turned on. This task may be accomplished in three steps:

00) Tweak make-docfile to avoid EXFUN anywhere except generated globals.h,
     and change DEFUN to avoid conflict with EXFUN;
01) Fix components comes from gnulib;
02) Fix the rest, offloading lisp.h where possible.

If there is a chance that 01) will be incorporated into gnulib and there are no
objections for the rest, I'll do 00) and 02) as proposed in the patches below.

Dmitry

[-- Attachment #2: 00_base_Wredundant_decls.patch --]
[-- Type: text/x-patch, Size: 3473 bytes --]

=== modified file 'lib-src/make-docfile.c'
--- lib-src/make-docfile.c	2014-01-01 07:43:34 +0000
+++ lib-src/make-docfile.c	2014-06-17 07:23:41 +0000
@@ -672,7 +672,17 @@
 	    fprintf (outfile, "UNEVALLED");
 	  else
 	    fprintf (outfile, "%d", globals[i].value);
-	  fprintf (outfile, ");\n");
+	  fprintf (outfile, ")");
+	  /* Likewise for gcc-style attributes.  */
+	  if (strcmp (globals[i].name, "Fbyteorder") == 0
+#if defined USE_GTK || defined HAVE_NS
+	      || strcmp (globals[i].name, "Ftool_bar_height") == 0
+#endif
+	      || strcmp (globals[i].name, "Fmax_char") == 0
+	      || strcmp (globals[i].name, "Fidentity") == 0)
+	    fprintf (outfile, " ATTRIBUTE_CONST;\n");
+	  else
+	    fprintf (outfile, ";\n");
 	}
 
       while (i + 1 < num_globals

=== modified file 'src/keyboard.c'
--- src/keyboard.c	2014-06-08 18:27:22 +0000
+++ src/keyboard.c	2014-06-17 07:26:44 +0000
@@ -1216,7 +1216,7 @@
   xsignal1 (Quser_error, build_string (msg));
 }
 
-_Noreturn
+/* _Noreturn will be added to prototype by make-docfile.  */
 DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "",
        doc: /* Exit from the innermost recursive edit or minibuffer.  */)
   (void)
@@ -1227,7 +1227,7 @@
   user_error ("No recursive edit is in progress");
 }
 
-_Noreturn
+/* _Noreturn will be added to prototype by make-docfile.  */
 DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0, 0, "",
        doc: /* Abort the command that requested this recursive edit or minibuffer input.  */)
   (void)

=== modified file 'src/lisp.h'
--- src/lisp.h	2014-06-17 03:14:00 +0000
+++ src/lisp.h	2014-06-17 07:24:32 +0000
@@ -2687,7 +2687,6 @@
    Lisp_Object fnname
 #else  /* not _MSC_VER */
 #define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc)	\
-   Lisp_Object fnname DEFUN_ARGS_ ## maxargs ;				\
    static struct Lisp_Subr alignas (GCALIGNMENT) sname =		\
      { { PVEC_SUBR << PSEUDOVECTOR_AREA_BITS },			\
        { .a ## maxargs = fnname },					\
@@ -3379,8 +3378,6 @@
 
 extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
 
-EXFUN (Fbyteorder, 0) ATTRIBUTE_CONST;
-
 /* Defined in data.c.  */
 extern Lisp_Object indirect_function (Lisp_Object);
 extern Lisp_Object find_symbol_value (Lisp_Object);
@@ -3446,7 +3443,6 @@
 extern void syms_of_coding (void);
 
 /* Defined in character.c.  */
-EXFUN (Fmax_char, 0) ATTRIBUTE_CONST;
 extern ptrdiff_t chars_in_text (const unsigned char *, ptrdiff_t);
 extern ptrdiff_t multibyte_chars_in_text (const unsigned char *, ptrdiff_t);
 extern int multibyte_char_to_unibyte (int) ATTRIBUTE_CONST;
@@ -3470,7 +3466,6 @@
 /* Defined in fns.c.  */
 extern Lisp_Object QCrehash_size, QCrehash_threshold;
 enum { NEXT_ALMOST_PRIME_LIMIT = 11 };
-EXFUN (Fidentity, 1) ATTRIBUTE_CONST;
 extern EMACS_INT next_almost_prime (EMACS_INT) ATTRIBUTE_CONST;
 extern Lisp_Object larger_vector (Lisp_Object, ptrdiff_t, ptrdiff_t);
 extern void sweep_weak_hash_tables (void);

=== modified file 'src/xdisp.c'
--- src/xdisp.c	2014-06-15 00:06:30 +0000
+++ src/xdisp.c	2014-06-17 07:19:12 +0000
@@ -12279,11 +12279,6 @@
 
 #endif /* !USE_GTK && !HAVE_NS */
 
-#if defined USE_GTK || defined HAVE_NS
-EXFUN (Ftool_bar_height, 2) ATTRIBUTE_CONST;
-EXFUN (Ftool_bar_lines_needed, 1) ATTRIBUTE_CONST;
-#endif
-
 DEFUN ("tool-bar-height", Ftool_bar_height, Stool_bar_height,
        0, 2, 0,
        doc: /* Return the number of lines occupied by the tool bar of FRAME.


[-- Attachment #3: 01_lib_Wredundant_decls.patch --]
[-- Type: text/x-patch, Size: 701 bytes --]

=== modified file 'lib/file-has-acl.c'
--- lib/file-has-acl.c	2014-01-01 07:43:34 +0000
+++ lib/file-has-acl.c	2014-06-17 07:33:32 +0000
@@ -25,8 +25,6 @@
 
 #include <config.h>
 
-#include "acl.h"
-
 #include "acl-internal.h"
 
 

=== modified file 'lib/qcopy-acl.c'
--- lib/qcopy-acl.c	2014-01-01 07:43:34 +0000
+++ lib/qcopy-acl.c	2014-06-17 07:33:44 +0000
@@ -19,8 +19,6 @@
 
 #include <config.h>
 
-#include "acl.h"
-
 #include "acl-internal.h"
 
 

=== modified file 'lib/qset-acl.c'
--- lib/qset-acl.c	2014-01-01 07:43:34 +0000
+++ lib/qset-acl.c	2014-06-17 07:33:55 +0000
@@ -21,8 +21,6 @@
 
 #define ACL_INTERNAL_INLINE _GL_EXTERN_INLINE
 
-#include "acl.h"
-
 #include "acl-internal.h"
 
 


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 02_common_Wredundant_decls.patch --]
[-- Type: text/x-patch; name="02_common_Wredundant_decls.patch", Size: 17287 bytes --]

=== modified file 'lib-src/emacsclient.c'
--- lib-src/emacsclient.c	2014-05-03 20:13:10 +0000
+++ lib-src/emacsclient.c	2014-06-17 07:35:49 +0000
@@ -82,10 +82,6 @@
 #include <signal.h>
 #include <errno.h>
 
-
-\f
-char *getenv (const char *);
-
 #ifndef VERSION
 #define VERSION "unspecified"
 #endif

=== modified file 'lwlib/lwlib-Xm.c'
--- lwlib/lwlib-Xm.c	2014-05-30 13:22:29 +0000
+++ lwlib/lwlib-Xm.c	2014-06-17 08:16:30 +0000
@@ -79,7 +79,6 @@
                                                     Boolean);
 static void free_destroyed_instance (destroyed_instance*);
 Widget first_child (Widget);
-Boolean lw_motif_widget_p (Widget);
 static XmString resource_motif_string (Widget, char *);
 static void destroy_all_children (Widget, int);
 static void xm_update_label (widget_instance *, Widget, widget_value *);
@@ -99,7 +98,6 @@
 static void xm_update_text (widget_instance *, Widget, widget_value *);
 static void xm_update_text_field (widget_instance *, Widget,
                                   widget_value *);
-void xm_update_one_value (widget_instance *, Widget, widget_value *);
 static void activate_button (Widget, XtPointer, XtPointer);
 static Widget make_dialog (char *, Widget, Boolean, char *, char *,
                            Boolean, Boolean, Boolean, int, int);
@@ -107,21 +105,16 @@
 static void mark_dead_instance_destroyed (Widget, XtPointer, XtPointer);
 static void recenter_widget (Widget);
 static Widget recycle_instance (destroyed_instance*);
-Widget xm_create_dialog (widget_instance*);
 static Widget make_menubar (widget_instance*);
 static void remove_grabs (Widget, XtPointer, XtPointer);
 static Widget make_popup_menu (widget_instance*);
 static Widget make_main (widget_instance*);
-void xm_destroy_instance (widget_instance*);
-void xm_popup_menu (Widget, XEvent *);
 static void set_min_dialog_size (Widget);
 static void do_call (Widget, XtPointer, enum do_call_type);
 static void xm_generic_callback (Widget, XtPointer, XtPointer);
 static void xm_nosel_callback (Widget, XtPointer, XtPointer);
 static void xm_pull_down_callback (Widget, XtPointer, XtPointer);
 static void xm_pop_down_callback (Widget, XtPointer, XtPointer);
-void xm_set_keyboard_focus (Widget, Widget);
-void xm_set_main_areas (Widget, Widget, Widget);
 static void xm_internal_update_other_instances (Widget, XtPointer,
                                                 XtPointer);
 static void xm_arm_callback (Widget, XtPointer, XtPointer);

=== modified file 'm4/manywarnings.m4'
--- m4/manywarnings.m4	2014-01-03 01:59:58 +0000
+++ m4/manywarnings.m4	2014-06-17 07:32:06 +0000
@@ -113,6 +113,7 @@
     -Wcpp \
     -Wdeprecated \
     -Wdeprecated-declarations \
+    -Wredundant-decls \
     -Wdisabled-optimization \
     -Wdiv-by-zero \
     -Wdouble-promotion \

=== modified file 'src/commands.h'
--- src/commands.h	2014-01-01 07:43:34 +0000
+++ src/commands.h	2014-06-17 07:47:17 +0000
@@ -39,7 +39,3 @@
 /* Nonzero if input is coming from the keyboard.  */
 
 #define INTERACTIVE (NILP (Vexecuting_kbd_macro) && !noninteractive)
-
-/* Set this nonzero to force reconsideration of mode line.  */
-
-extern int update_mode_lines;

=== modified file 'src/dispextern.h'
--- src/dispextern.h	2014-06-10 04:55:03 +0000
+++ src/dispextern.h	2014-06-17 07:44:33 +0000
@@ -3327,7 +3327,6 @@
 void unrequest_sigio (void);
 bool tabs_safe_p (int);
 void init_baud_rate (int);
-void init_sigio (int);
 void ignore_sigio (void);
 
 /* Defined in xfaces.c.  */

=== modified file 'src/frame.c'
--- src/frame.c	2014-06-10 05:28:00 +0000
+++ src/frame.c	2014-06-17 08:08:28 +0000
@@ -50,6 +50,9 @@
 #include "msdos.h"
 #include "dosfns.h"
 #endif
+#ifdef USE_X_TOOLKIT
+#include "widget.h"
+#endif
 
 #ifdef HAVE_NS
 Lisp_Object Qns_parse_geometry;

=== modified file 'src/frame.h'
--- src/frame.h	2014-06-10 05:28:00 +0000
+++ src/frame.h	2014-06-17 07:50:39 +0000
@@ -1224,7 +1224,6 @@
 extern Lisp_Object Qbuffer_predicate;
 extern Lisp_Object Qcursor_color, Qcursor_type;
 extern Lisp_Object Qfont;
-extern Lisp_Object Qbackground_color, Qforeground_color;
 extern Lisp_Object Qicon, Qicon_name, Qicon_type, Qicon_left, Qicon_top;
 extern Lisp_Object Qinternal_border_width;
 extern Lisp_Object Qright_divider_width, Qbottom_divider_width;
@@ -1325,7 +1324,6 @@
 extern void x_make_frame_invisible (struct frame *f);
 extern void x_iconify_frame (struct frame *f);
 extern void x_set_frame_alpha (struct frame *f);
-extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
 extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
 extern void x_activate_menubar (struct frame *);
 extern void x_real_positions (struct frame *, int *, int *);

=== modified file 'src/ftfont.c'
--- src/ftfont.c	2014-01-23 12:18:08 +0000
+++ src/ftfont.c	2014-06-17 07:56:56 +0000
@@ -87,8 +87,6 @@
 
 static void ftfont_filter_properties (Lisp_Object font, Lisp_Object alist);
 
-Lisp_Object ftfont_font_format (FcPattern *, Lisp_Object);
-
 #define SYMBOL_FcChar8(SYM) (FcChar8 *) SDATA (SYMBOL_NAME (SYM))
 
 static struct

=== modified file 'src/intervals.h'
--- src/intervals.h	2014-01-21 02:28:57 +0000
+++ src/intervals.h	2014-06-17 07:50:19 +0000
@@ -278,10 +278,8 @@
 extern Lisp_Object Qmodification_hooks;
 extern Lisp_Object Qcategory;
 extern Lisp_Object Qlocal_map;
-extern Lisp_Object Qkeymap;
 
 /* Visual properties text (including strings) may have.  */
-extern Lisp_Object Qfont;
 extern Lisp_Object Qinvisible, Qintangible;
 
 /* Sticky properties.  */

=== modified file 'src/keyboard.c'
--- src/keyboard.c	2014-06-17 07:30:19 +0000
+++ src/keyboard.c	2014-06-17 07:53:56 +0000
@@ -356,7 +356,6 @@
 static void recursive_edit_unwind (Lisp_Object buffer);
 static Lisp_Object command_loop (void);
 static Lisp_Object Qcommand_execute;
-struct timespec timer_check (void);
 
 static void echo_now (void);
 static ptrdiff_t echo_length (void);
@@ -1314,7 +1313,6 @@
 
 static int read_key_sequence (Lisp_Object *, int, Lisp_Object,
                               bool, bool, bool, bool);
-void safe_run_hooks (Lisp_Object);
 static void adjust_point_for_property (ptrdiff_t, bool);
 
 /* The last boundary auto-added to buffer-undo-list.  */

=== modified file 'src/lisp.h'
--- src/lisp.h	2014-06-17 07:30:19 +0000
+++ src/lisp.h	2014-06-17 07:48:01 +0000
@@ -832,12 +832,13 @@
 extern Lisp_Object Qbool_vector_p;
 extern Lisp_Object Qvector_or_char_table_p, Qwholenump;
 extern Lisp_Object Qwindow;
-extern Lisp_Object Ffboundp (Lisp_Object);
 extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object);
 
 /* Defined in emacs.c.  */
-extern bool initialized;
 extern bool might_dump;
+/* True means Emacs has already been initialized.
+   Used during startup to detect startup of dumped Emacs.  */
+extern bool initialized;
 
 /* Defined in eval.c.  */
 extern Lisp_Object Qautoload;
@@ -3349,7 +3350,7 @@
 }
 
 /* Defined in data.c.  */
-extern Lisp_Object Qnil, Qt, Qquote, Qlambda, Qunbound;
+extern Lisp_Object Qquote, Qunbound;
 extern Lisp_Object Qerror_conditions, Qerror_message, Qtop_level;
 extern Lisp_Object Qerror, Qquit, Qargs_out_of_range;
 extern Lisp_Object Qvoid_variable, Qvoid_function;
@@ -3360,24 +3361,18 @@
 extern Lisp_Object Qtext_read_only;
 extern Lisp_Object Qinteractive_form;
 extern Lisp_Object Qcircular_list;
-extern Lisp_Object Qintegerp, Qwholenump, Qsymbolp, Qlistp, Qconsp;
-extern Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp;
-extern Lisp_Object Qchar_or_string_p, Qmarkerp, Qinteger_or_marker_p, Qvectorp;
-extern Lisp_Object Qbuffer_or_string_p;
+extern Lisp_Object Qsequencep;
+extern Lisp_Object Qchar_or_string_p, Qinteger_or_marker_p;
 extern Lisp_Object Qfboundp;
-extern Lisp_Object Qchar_table_p, Qvector_or_char_table_p;
 
 extern Lisp_Object Qcdr;
 
 extern Lisp_Object Qrange_error, Qoverflow_error;
 
-extern Lisp_Object Qfloatp;
-extern Lisp_Object Qnumberp, Qnumber_or_marker_p;
+extern Lisp_Object Qnumber_or_marker_p;
 
 extern Lisp_Object Qbuffer, Qinteger, Qsymbol;
 
-extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
-
 /* Defined in data.c.  */
 extern Lisp_Object indirect_function (Lisp_Object);
 extern Lisp_Object find_symbol_value (Lisp_Object);
@@ -3424,7 +3419,6 @@
 extern _Noreturn void args_out_of_range (Lisp_Object, Lisp_Object);
 extern _Noreturn void args_out_of_range_3 (Lisp_Object, Lisp_Object,
 					   Lisp_Object);
-extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object);
 extern Lisp_Object do_symval_forwarding (union Lisp_Fwd *);
 extern void set_internal (Lisp_Object, Lisp_Object, Lisp_Object, bool);
 extern void syms_of_data (void);
@@ -3456,9 +3450,6 @@
 /* Structure forward declarations.  */
 struct charset;
 
-/* Defined in composite.c.  */
-extern void syms_of_composite (void);
-
 /* Defined in syntax.c.  */
 extern void init_syntax_once (void);
 extern void syms_of_syntax (void);
@@ -3498,7 +3489,6 @@
 extern void syms_of_fns (void);
 
 /* Defined in floatfns.c.  */
-extern double extract_float (Lisp_Object);
 extern void syms_of_floatfns (void);
 extern Lisp_Object fmod_float (Lisp_Object x, Lisp_Object y);
 
@@ -3571,18 +3561,16 @@
 #endif
 extern Lisp_Object Vwindow_system;
 extern Lisp_Object sit_for (Lisp_Object, bool, int);
-extern void init_display (void);
-extern void syms_of_display (void);
 
 /* Defined in xdisp.c.  */
 extern Lisp_Object Qinhibit_point_motion_hooks;
-extern Lisp_Object Qinhibit_redisplay, Qdisplay;
+extern Lisp_Object Qinhibit_redisplay;
 extern Lisp_Object Qmenu_bar_update_hook;
 extern Lisp_Object Qwindow_scroll_functions;
 extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
-extern Lisp_Object Qimage, Qtext, Qboth, Qboth_horiz, Qtext_image_horiz;
+extern Lisp_Object Qtext, Qboth, Qboth_horiz, Qtext_image_horiz;
 extern Lisp_Object Qspace, Qcenter, QCalign_to;
-extern Lisp_Object Qbar, Qhbar, Qbox, Qhollow;
+extern Lisp_Object Qbar, Qhbar, Qhollow;
 extern Lisp_Object Qleft_margin, Qright_margin;
 extern Lisp_Object QCdata, QCfile;
 extern Lisp_Object QCmap;
@@ -3609,7 +3597,6 @@
 extern void update_echo_area (void);
 extern void truncate_echo_area (ptrdiff_t);
 extern void redisplay (void);
-extern void redisplay_preserve_echo_area (int);
 
 void set_frame_cursor_types (struct frame *, Lisp_Object);
 extern void syms_of_xdisp (void);
@@ -3792,12 +3779,9 @@
 
 /* Defined in chartab.c.  */
 extern Lisp_Object copy_char_table (Lisp_Object);
-extern Lisp_Object char_table_ref (Lisp_Object, int);
 extern Lisp_Object char_table_ref_and_range (Lisp_Object, int,
                                              int *, int *);
-extern void char_table_set (Lisp_Object, int, Lisp_Object);
 extern void char_table_set_range (Lisp_Object, int, int, Lisp_Object);
-extern int char_table_translate (Lisp_Object, int);
 extern void map_char_table (void (*) (Lisp_Object, Lisp_Object,
                             Lisp_Object),
                             Lisp_Object, Lisp_Object, Lisp_Object);
@@ -3875,7 +3859,7 @@
 }
 
 /* Defined in eval.c.  */
-extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qmacro;
+extern Lisp_Object Qexit, Qinteractive, Qcommandp, Qmacro;
 extern Lisp_Object Qinhibit_quit, Qinternal_interpreter_environment, Qclosure;
 extern Lisp_Object Qand_rest;
 extern Lisp_Object Vautoload_queue;
@@ -4083,8 +4067,7 @@
 extern struct kboard *echo_kboard;
 extern void cancel_echoing (void);
 extern Lisp_Object Qdisabled, QCfilter;
-extern Lisp_Object Qup, Qdown, Qbottom;
-extern Lisp_Object Qtop;
+extern Lisp_Object Qup, Qdown;
 extern Lisp_Object last_undo_boundary;
 extern bool input_pending;
 extern Lisp_Object menu_bar_items (Lisp_Object);
@@ -4116,7 +4099,6 @@
 
 /* Defined in frame.c.  */
 extern Lisp_Object Qonly, Qnone;
-extern Lisp_Object Qvisible;
 extern void set_frame_param (struct frame *, Lisp_Object, Lisp_Object);
 extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object);
 extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object);
@@ -4236,9 +4218,8 @@
                                     Lisp_Object);
 extern void syms_of_undo (void);
 /* Defined in textprop.c.  */
-extern Lisp_Object Qfont, Qmouse_face;
+extern Lisp_Object Qmouse_face;
 extern Lisp_Object Qinsert_in_front_hooks, Qinsert_behind_hooks;
-extern Lisp_Object Qfront_sticky, Qrear_nonsticky;
 extern Lisp_Object Qminibuffer_prompt;
 
 extern void report_interval_modification (Lisp_Object, Lisp_Object);
@@ -4346,8 +4327,8 @@
 #endif
 
 /* Defined in xfaces.c.  */
-extern Lisp_Object Qdefault, Qtool_bar, Qfringe;
-extern Lisp_Object Qheader_line, Qscroll_bar, Qcursor;
+extern Lisp_Object Qdefault, Qfringe;
+extern Lisp_Object Qscroll_bar, Qcursor;
 extern Lisp_Object Qmode_line_inactive;
 extern Lisp_Object Qface;
 extern Lisp_Object Qnormal;
@@ -4406,10 +4387,6 @@
 /* Defined in msdos.c, w32.c.  */
 extern char *emacs_root_dir (void);
 #endif /* DOS_NT */
-\f
-/* True means Emacs has already been initialized.
-   Used during startup to detect startup of dumped Emacs.  */
-extern bool initialized;
 
 /* True means ^G can quit instantly.  */
 extern bool immediate_quit;

=== modified file 'src/macros.c'
--- src/macros.c	2014-02-09 01:48:47 +0000
+++ src/macros.c	2014-06-17 07:54:13 +0000
@@ -45,8 +45,6 @@
 
 Lisp_Object executing_kbd_macro;
 
-Lisp_Object Fexecute_kbd_macro (Lisp_Object macro, Lisp_Object count, Lisp_Object loopfunc);
-\f
 DEFUN ("start-kbd-macro", Fstart_kbd_macro, Sstart_kbd_macro, 1, 2, "P",
        doc: /* Record subsequent keyboard input, defining a keyboard macro.
 The commands are recorded even as they are executed.

=== modified file 'src/window.c'
--- src/window.c	2014-06-06 14:37:05 +0000
+++ src/window.c	2014-06-17 07:51:06 +0000
@@ -27,6 +27,7 @@
 #include "buffer.h"
 #include "keyboard.h"
 #include "keymap.h"
+#include "menu.h"
 #include "frame.h"
 #include "window.h"
 #include "commands.h"

=== modified file 'src/xfns.c'
--- src/xfns.c	2014-05-27 06:35:54 +0000
+++ src/xfns.c	2014-06-17 07:53:26 +0000
@@ -24,6 +24,7 @@
 
 #include "lisp.h"
 #include "xterm.h"
+#include "menu.h"
 #include "frame.h"
 #include "window.h"
 #include "character.h"

=== modified file 'src/xterm.c'
--- src/xterm.c	2014-06-17 03:40:29 +0000
+++ src/xterm.c	2014-06-17 07:52:54 +0000
@@ -226,7 +226,6 @@
 static const XColor *x_color_cells (Display *, int *);
 static int x_io_error_quitter (Display *);
 static struct terminal *x_create_terminal (struct x_display_info *);
-void x_delete_terminal (struct terminal *);
 static void x_update_end (struct frame *);
 static void XTframe_up_to_date (struct frame *);
 static void x_clear_frame (struct frame *);
@@ -7859,11 +7858,6 @@
 
 #endif /* HAVE_X11R6 */
 
-#ifdef HAVE_X11R6
-/* This isn't prototyped in OSF 5.0 or 5.1a.  */
-extern char *XSetIMValues (XIM, ...);
-#endif
-
 /* Open the connection to the XIM server on display DPYINFO.
    RESOURCE_NAME is the resource name Emacs uses.  */
 

=== modified file 'src/xterm.h'
--- src/xterm.h	2014-06-08 18:27:22 +0000
+++ src/xterm.h	2014-06-17 08:08:33 +0000
@@ -929,7 +929,6 @@
 extern bool x_had_errors_p (Display *);
 extern void x_uncatch_errors (void);
 extern void x_clear_errors (Display *);
-extern void x_set_window_size (struct frame *, int, int, int, bool);
 extern void xembed_request_focus (struct frame *);
 extern void x_ewmh_activate_frame (struct frame *);
 extern void x_delete_terminal (struct terminal *terminal);
@@ -944,7 +943,6 @@
 					      double, int);
 #endif
 extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *);
-extern void x_query_color (struct frame *f, XColor *);
 extern void x_clear_area (Display *, Window, int, int, int, int);
 #if !defined USE_X_TOOLKIT && !defined USE_GTK
 extern void x_mouse_leave (struct x_display_info *);
@@ -991,16 +989,11 @@
 extern void x_clipboard_manager_save_frame (Lisp_Object);
 extern void x_clipboard_manager_save_all (void);
 
-/* Defined in xfns.c */
-
-extern Lisp_Object x_get_focus_frame (struct frame *);
-
 #ifdef USE_GTK
 extern int xg_set_icon (struct frame *, Lisp_Object);
 extern int xg_set_icon_from_xpm_data (struct frame *, const char **);
 #endif /* USE_GTK */
 
-extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
 extern void xic_free_xfontset (struct frame *);
 extern void create_frame_xic (struct frame *);
 extern void destroy_frame_xic (struct frame *);
@@ -1032,15 +1025,8 @@
 extern void x_menu_set_in_use (int);
 #endif
 extern void x_menu_wait_for_event (void *data);
-extern int popup_activated (void);
 extern void initialize_frame_menubar (struct frame *);
 
-/* Defined in widget.c */
-
-#ifdef USE_X_TOOLKIT
-extern void widget_store_internal_border (Widget);
-#endif
-
 /* Defined in xsmfns.c */
 #ifdef HAVE_X_SM
 extern void x_session_initialize (struct x_display_info *dpyinfo);


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Cleaning up for -Wredundant-decls
  2014-06-17  9:02 Cleaning up for -Wredundant-decls Dmitry Antipov
@ 2014-06-17 16:20 ` Paul Eggert
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggert @ 2014-06-17 16:20 UTC (permalink / raw)
  To: Dmitry Antipov, Emacs development discussions

Dmitry Antipov wrote:
> If there is a chance that 01) will be incorporated into gnulib

That'd conflict with Bison-generated code, which is why gnulib doesn't 
enable -Wredundant-decl by default.  Emacs doesn't use Bison-generated 
code, though, so it can enable -Wredundant-decl by using gl_WARN_ADD in 
its own configure.ac.  I did that in trunk bzr 117358, incorporating 
your patch.  (I solved the acl.h problem in gnulib in a different way.) 
  Thanks for doing this cleanup.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-17 16:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-17  9:02 Cleaning up for -Wredundant-decls Dmitry Antipov
2014-06-17 16:20 ` Paul Eggert

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.