emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 65ac277: Port --enable-gcc-warnings to GCC 8


From: Paul Eggert
Subject: [Emacs-diffs] emacs-26 65ac277: Port --enable-gcc-warnings to GCC 8
Date: Mon, 30 Apr 2018 20:17:59 -0400 (EDT)

branch: emacs-26
commit 65ac27783a959a8339c2aab0f1e54d9b508a1f1f
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    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.
---
 lib-src/emacsclient.c | 2 +-
 src/frame.c           | 1 +
 src/menu.h            | 2 +-
 src/regex.c           | 3 +--
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 574bec8..b139b2f 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -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;
 
diff --git a/src/frame.c b/src/frame.c
index cee775c..0a6ca26 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -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.
diff --git a/src/menu.h b/src/menu.h
index 4c4ac83..1aa53f7 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -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);
diff --git a/src/regex.c b/src/regex.c
index e8b99f6..4f9df68 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -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:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]