1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-24 10:38:38 +00:00

Port --enable-gcc-warnings to GCC 8

Backport from master.
* lib-src/emacsclient.c (fail):
Do not dereference a null pointer.
* src/frame.c (delete_frame):
Add a decl with UNINIT to work around GCC bug 85563.
* src/menu.h (finish_menu_items):
Do not use attribute const.
* src/regex.c (analyze_first): Use FALLTHROUGH, not a comment.
This commit is contained in:
Paul Eggert 2018-04-30 17:17:11 -07:00
parent 4b10800b59
commit 65ac27783a
4 changed files with 4 additions and 4 deletions

View File

@ -700,7 +700,7 @@ fail (void)
{
size_t extra_args_size = (main_argc - optind + 1) * sizeof (char *);
size_t new_argv_size = extra_args_size;
char **new_argv = NULL;
char **new_argv = xmalloc (new_argv_size);
char *s = xstrdup (alternate_editor);
unsigned toks = 0;

View File

@ -1933,6 +1933,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
if (f == sf)
{
Lisp_Object tail;
Lisp_Object frame1 UNINIT; /* This line works around GCC bug 85563. */
eassume (CONSP (Vframe_list));
/* Look for another visible frame on the same terminal.

View File

@ -30,7 +30,7 @@ enum {
};
extern void init_menu_items (void);
extern void finish_menu_items (void) ATTRIBUTE_CONST;
extern void finish_menu_items (void);
extern void discard_menu_items (void);
extern void save_menu_items (void);
extern bool parse_single_submenu (Lisp_Object, Lisp_Object, Lisp_Object);

View File

@ -4038,8 +4038,7 @@ analyze_first (const_re_char *p, const_re_char *pend, char *fastmap,
};
/* Keep `p1' to allow the `on_failure_jump' we are jumping to
to jump back to "just after here". */
/* Fallthrough */
FALLTHROUGH;
case on_failure_jump:
case on_failure_keep_string_jump:
case on_failure_jump_nastyloop: