aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2018-04-28 16:49:24 -0700
committerPaul Eggert2018-04-28 16:56:48 -0700
commit8c3215e7a47e3caaa005bf573765ed63e0739b89 (patch)
tree0b90cacdef1a62ff888e92d0742b715ee69705ce /src
parent2b9ab8c8fba849da8bf2aa45e65b122bb937a6b3 (diff)
downloademacs-8c3215e7a47e3caaa005bf573765ed63e0739b89.tar.gz
emacs-8c3215e7a47e3caaa005bf573765ed63e0739b89.zip
Port --enable-gcc-warnings to GCC 8
* configure.ac: Do not use GCC 8’s new -Wcast-align flag. * lib-src/ebrowse.c (xmalloc): * lib-src/emacsclient.c (xmalloc, xstrdup): * lib-src/etags.c (xmalloc): * lib-src/make-docfile.c (xmalloc): * lib-src/movemail.c (xmalloc): * src/dispnew.c (new_glyph_pool): * src/regex.c (xmalloc): * src/term.c (tty_menu_create): * src/tparam.h (tparam): Use ATTRIBUTE_MALLOC. Also see GCC bug 85562. * 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.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c2
-rw-r--r--src/frame.c1
-rw-r--r--src/menu.h2
-rw-r--r--src/regex.c5
-rw-r--r--src/term.c2
-rw-r--r--src/tparam.h2
6 files changed, 7 insertions, 7 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 324c05ddc4c..b854d179d51 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1280,7 +1280,7 @@ row_equal_p (struct glyph_row *a, struct glyph_row *b, bool mouse_face_p)
1280 with zeros. If GLYPH_DEBUG and ENABLE_CHECKING are in effect, the global 1280 with zeros. If GLYPH_DEBUG and ENABLE_CHECKING are in effect, the global
1281 variable glyph_pool_count is incremented for each pool allocated. */ 1281 variable glyph_pool_count is incremented for each pool allocated. */
1282 1282
1283static struct glyph_pool * 1283static struct glyph_pool * ATTRIBUTE_MALLOC
1284new_glyph_pool (void) 1284new_glyph_pool (void)
1285{ 1285{
1286 struct glyph_pool *result = xzalloc (sizeof *result); 1286 struct glyph_pool *result = xzalloc (sizeof *result);
diff --git a/src/frame.c b/src/frame.c
index 86caa32615d..da82621b8a0 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1937,6 +1937,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
1937 if (f == sf) 1937 if (f == sf)
1938 { 1938 {
1939 Lisp_Object tail; 1939 Lisp_Object tail;
1940 Lisp_Object frame1 UNINIT; /* This line works around GCC bug 85563. */
1940 eassume (CONSP (Vframe_list)); 1941 eassume (CONSP (Vframe_list));
1941 1942
1942 /* Look for another visible frame on the same terminal. 1943 /* Look for another visible frame on the same terminal.
diff --git a/src/menu.h b/src/menu.h
index 104f6dc81d2..fa32a86d1c8 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -30,7 +30,7 @@ enum {
30}; 30};
31 31
32extern void init_menu_items (void); 32extern void init_menu_items (void);
33extern void finish_menu_items (void) ATTRIBUTE_CONST; 33extern void finish_menu_items (void);
34extern void discard_menu_items (void); 34extern void discard_menu_items (void);
35extern void save_menu_items (void); 35extern void save_menu_items (void);
36extern bool parse_single_submenu (Lisp_Object, Lisp_Object, Lisp_Object); 36extern bool parse_single_submenu (Lisp_Object, Lisp_Object, Lisp_Object);
diff --git a/src/regex.c b/src/regex.c
index a4e6441cce3..85e63feea10 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -212,7 +212,7 @@
212 212
213/* When used in Emacs's lib-src, we need xmalloc and xrealloc. */ 213/* When used in Emacs's lib-src, we need xmalloc and xrealloc. */
214 214
215static void * 215static ATTRIBUTE_MALLOC void *
216xmalloc (size_t size) 216xmalloc (size_t size)
217{ 217{
218 void *val = malloc (size); 218 void *val = malloc (size);
@@ -4033,8 +4033,7 @@ analyze_first (re_char *p, re_char *pend, char *fastmap,
4033 }; 4033 };
4034 /* Keep `p1' to allow the `on_failure_jump' we are jumping to 4034 /* Keep `p1' to allow the `on_failure_jump' we are jumping to
4035 to jump back to "just after here". */ 4035 to jump back to "just after here". */
4036 /* Fallthrough */ 4036 FALLTHROUGH;
4037
4038 case on_failure_jump: 4037 case on_failure_jump:
4039 case on_failure_keep_string_jump: 4038 case on_failure_keep_string_jump:
4040 case on_failure_jump_nastyloop: 4039 case on_failure_jump_nastyloop:
diff --git a/src/term.c b/src/term.c
index 8be5fb319b0..08d483f4fa0 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2721,7 +2721,7 @@ typedef struct tty_menu_struct
2721 2721
2722/* Create a brand new menu structure. */ 2722/* Create a brand new menu structure. */
2723 2723
2724static tty_menu * 2724static tty_menu * ATTRIBUTE_MALLOC
2725tty_menu_create (void) 2725tty_menu_create (void)
2726{ 2726{
2727 return xzalloc (sizeof *tty_menu_create ()); 2727 return xzalloc (sizeof *tty_menu_create ());
diff --git a/src/tparam.h b/src/tparam.h
index 3a3cb52c178..79c55b94d2a 100644
--- a/src/tparam.h
+++ b/src/tparam.h
@@ -30,7 +30,7 @@ int tgetnum (const char *);
30char *tgetstr (const char *, char **); 30char *tgetstr (const char *, char **);
31char *tgoto (const char *, int, int); 31char *tgoto (const char *, int, int);
32 32
33char *tparam (const char *, char *, int, int, int, int, int); 33char *tparam (const char *, char *, int, int, int, int, int) ATTRIBUTE_MALLOC;
34 34
35extern char PC; 35extern char PC;
36extern char *BC; 36extern char *BC;