1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

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.
This commit is contained in:
Paul Eggert 2015-01-15 20:37:05 -08:00
parent 255d2a5a53
commit 0adc75af18
10 changed files with 34 additions and 21 deletions

View file

@ -729,18 +729,6 @@ write_globals (void)
if (globals[i].flags & DEFUN_const)
fputs (" ATTRIBUTE_CONST", stdout);
else if (strcmp (globals[i].name, "Fnext_read_file_uses_dialog_p")
== 0)
{
/* It would be nice to have a cleaner way to deal with this
special hack. */
fputs (("\n"
"#if ! (defined USE_GTK || defined USE_MOTIF \\\n"
" || defined HAVE_NS || defined HAVE_NTGUI)\n"
"\tATTRIBUTE_CONST\n"
"#endif\n"),
stdout);
}
puts (";");
}