diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2015-01-15 20:37:05 -0800 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-01-15 20:37:44 -0800 |
| commit | 0adc75af1833cd46aab339ce7f1ca5d6919c70af (patch) | |
| tree | fb4bc7c0172c31f8313bbde3dabe4ef9bf5fe07e /src | |
| parent | 255d2a5a53083d676977023e9772d97095c6db46 (diff) | |
| download | emacs-0adc75af1833cd46aab339ce7f1ca5d6919c70af.tar.gz | |
Give up on -Wsuggest-attribute=const
The attribute doesn't help performance significantly, and the
warning seems to be more trouble than it's worth. See the thread at:
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00361.html
* configure.ac (WERROR_CFLAGS): Don't use -Wsuggest-attribute=const.
* lib-src/make-docfile.c (write_globals):
Remove special hack for Fnext_read_file_uses_dialog_p.
* src/decompress.c (Fzlib_available_p):
* src/gnutls.c (Fgnutls_available_p):
* src/gtkutil.h (xg_uses_old_file_dialog):
* src/xdisp.c (Ftool_bar_height):
* src/xmenu.c (popup_activated):
No longer const, since it's not const on at lest some
configurations, and we shouldn't lie to the compiler.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 11 | ||||
| -rw-r--r-- | src/decompress.c | 3 | ||||
| -rw-r--r-- | src/gnutls.c | 3 | ||||
| -rw-r--r-- | src/gtkutil.h | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 3 | ||||
| -rw-r--r-- | src/xmenu.c | 2 |
6 files changed, 16 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 40d8b267d84..ae634f318f0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2015-01-16 Paul Eggert <eggert@cs.ucla.edu> + + Give up on -Wsuggest-attribute=const + * decompress.c (Fzlib_available_p): + * gnutls.c (Fgnutls_available_p): + * gtkutil.h (xg_uses_old_file_dialog): + * xdisp.c (Ftool_bar_height): + * xmenu.c (popup_activated): + No longer const, since it's not const on at lest some + configurations, and we shouldn't lie to the compiler. + 2015-01-15 Eli Zaretskii <eliz@gnu.org> * fileio.c: Include binary-io.h. diff --git a/src/decompress.c b/src/decompress.c index b78dacee207..b14f0a2cd79 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -88,8 +88,7 @@ unwind_decompress (void *ddata) } DEFUN ("zlib-available-p", Fzlib_available_p, Szlib_available_p, 0, 0, 0, - doc: /* Return t if zlib decompression is available in this instance of Emacs. */ - attributes: const) + doc: /* Return t if zlib decompression is available in this instance of Emacs. */) (void) { #ifdef WINDOWSNT diff --git a/src/gnutls.c b/src/gnutls.c index 909542f4212..35f0eb48bc1 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -1619,8 +1619,7 @@ This function may also return `gnutls-e-again', or #endif /* HAVE_GNUTLS */ DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0, 0, 0, - doc: /* Return t if GnuTLS is available in this instance of Emacs. */ - attributes: const) + doc: /* Return t if GnuTLS is available in this instance of Emacs. */) (void) { #ifdef HAVE_GNUTLS diff --git a/src/gtkutil.h b/src/gtkutil.h index 7d712c92e0d..0ac49ca7db5 100644 --- a/src/gtkutil.h +++ b/src/gtkutil.h @@ -78,7 +78,7 @@ typedef struct xg_menu_item_cb_data_ } xg_menu_item_cb_data; -extern bool xg_uses_old_file_dialog (void) ATTRIBUTE_CONST; +extern bool xg_uses_old_file_dialog (void); extern char *xg_get_file_name (struct frame *f, char *prompt, diff --git a/src/xdisp.c b/src/xdisp.c index 041a022a370..f006f8e0b94 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -12276,8 +12276,7 @@ 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. If FRAME is nil or omitted, use the selected frame. Optional argument -PIXELWISE non-nil means return the height of the tool bar in pixels. */ - attributes: const) +PIXELWISE non-nil means return the height of the tool bar in pixels. */) (Lisp_Object frame, Lisp_Object pixelwise) { int height = 0; diff --git a/src/xmenu.c b/src/xmenu.c index 9063a8a2a52..fdf1f6f4d84 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -2288,7 +2288,7 @@ x_menu_show (struct frame *f, int x, int y, int menuflags, /* Detect if a dialog or menu has been posted. MSDOS has its own implementation on msdos.c. */ -int ATTRIBUTE_CONST +int popup_activated (void) { return popup_activated_flag; |
