aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2013-05-17 22:32:17 -0700
committerPaul Eggert2013-05-17 22:32:17 -0700
commit31ff141c226d00ce8c85562e7812ff1178cb45ed (patch)
tree129202655e89622c0ea695d2993e9134990d29bd
parentbfbe26276d04b1e8aeaec21fea7573ac1135d521 (diff)
downloademacs-31ff141c226d00ce8c85562e7812ff1178cb45ed.tar.gz
emacs-31ff141c226d00ce8c85562e7812ff1178cb45ed.zip
Port --enable-gcc-warnings to clang.
* configure.ac (nw): Remove obsolescent warnings. These aren't needed for clang, or for gcc for that matter. (emacs_cv_clang): New var, which tests for clang. Omit warnings that clang is too picky about. (GLIB_DISABLE_DEPRECATION_WARNINGS): Define this; needed for Ubuntu 13.04 + clang + --enable-gcc-warnings. * lib-src/etags.c: Omit unnecessary forward decls. (print_version, print_help): Declare _Noreturn. * lib-src/pop.c (socket_connection) [HAVE_GETADDRINFO]: Simplify. * src/bytecode.c (exec_byte_code): * src/regex.c: Redo diagnostic pragmas to pacify clang, too. * src/dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable. * src/editfns.c (Fencode_time): * src/fileio.c (file_accessible_directory_p): * src/font.c (font_unparse_xlfd): Use '&"string"[index]' instead of '"string" + (index)'. * src/undo.c (user_error): Remove; unused.
-rw-r--r--ChangeLog8
-rw-r--r--configure.ac47
-rw-r--r--lib-src/ChangeLog7
-rw-r--r--lib-src/etags.c13
-rw-r--r--lib-src/pop.c36
-rw-r--r--src/ChangeLog13
-rw-r--r--src/bytecode.c7
-rw-r--r--src/dbusbind.c2
-rw-r--r--src/editfns.c2
-rw-r--r--src/fileio.c2
-rw-r--r--src/font.c4
-rw-r--r--src/regex.c7
-rw-r--r--src/undo.c6
13 files changed, 88 insertions, 66 deletions
diff --git a/ChangeLog b/ChangeLog
index 280aa2fbc4d..ed30fc35ad1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
12013-05-18 Paul Eggert <eggert@cs.ucla.edu> 12013-05-18 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Port --enable-gcc-warnings to clang.
4 * configure.ac (nw): Remove obsolescent warnings.
5 These aren't needed for clang, or for gcc for that matter.
6 (emacs_cv_clang): New var, which tests for clang.
7 Omit warnings that clang is too picky about.
8 (GLIB_DISABLE_DEPRECATION_WARNINGS): Define this;
9 needed for Ubuntu 13.04 + clang + --enable-gcc-warnings.
10
3 * make-dist (files): Add nt/Makefile.in, nt/gnulib.mk. 11 * make-dist (files): Add nt/Makefile.in, nt/gnulib.mk.
4 Otherwise, 'configure; make' fails on non-Windows builds. 12 Otherwise, 'configure; make' fails on non-Windows builds.
5 13
diff --git a/configure.ac b/configure.ac
index 54f499e2126..00c841e77b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -554,7 +554,7 @@ case "${canonical}" in
554 i[3456]86-*-* ) 554 i[3456]86-*-* )
555 case "${canonical}" in 555 case "${canonical}" in
556 *-darwin* ) opsys=darwin ;; 556 *-darwin* ) opsys=darwin ;;
557 *-mingw32 ) 557 *-mingw32 )
558 opsys=mingw32 558 opsys=mingw32
559 # MinGW overrides and adds some system headers in nt/inc. 559 # MinGW overrides and adds some system headers in nt/inc.
560 GCC_TEST_OPTIONS="-I $srcdir/nt/inc" 560 GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
@@ -747,27 +747,13 @@ else
747 esac 747 esac
748 AC_SUBST([WERROR_CFLAGS]) 748 AC_SUBST([WERROR_CFLAGS])
749 749
750 nw="$nw -Waggregate-return" # anachronistic
751 nw="$nw -Wlong-long" # C90 is anachronistic
752 nw="$nw -Wc++-compat" # We don't care about C++ compilers
753 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
754 nw="$nw -Wtraditional" # Warns on #elif which we use often
755 nw="$nw -Wcast-qual" # Too many warnings for now
756 nw="$nw -Wconversion" # Too many warnings for now
757 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings 750 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
758 nw="$nw -Wsign-conversion" # Too many warnings for now
759 nw="$nw -Woverlength-strings" # Not a problem these days 751 nw="$nw -Woverlength-strings" # Not a problem these days
760 nw="$nw -Wtraditional-conversion" # Too many warnings for now
761 nw="$nw -Wunreachable-code" # so buggy that it's now silently ignored
762 nw="$nw -Wpadded" # Our structs are not padded
763 nw="$nw -Wredundant-decls" # we regularly (re)declare functions
764 nw="$nw -Wlogical-op" # any use of fwrite provokes this 752 nw="$nw -Wlogical-op" # any use of fwrite provokes this
765 nw="$nw -Wformat-nonliteral" # we do this a lot 753 nw="$nw -Wformat-nonliteral" # we do this a lot
766 nw="$nw -Wvla" # warnings in gettext.h 754 nw="$nw -Wvla" # warnings in gettext.h
767 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__ 755 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
768 nw="$nw -Wswitch-enum" # Too many warnings for now
769 nw="$nw -Wswitch-default" # Too many warnings for now 756 nw="$nw -Wswitch-default" # Too many warnings for now
770 nw="$nw -Wfloat-equal" # warns about high-quality code
771 nw="$nw -Winline" # OK to ignore 'inline' 757 nw="$nw -Winline" # OK to ignore 'inline'
772 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init. 758 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
773 nw="$nw -Wstrict-overflow" # OK to optimize assuming that 759 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
@@ -785,6 +771,20 @@ else
785 # The following line should be removable at some point. 771 # The following line should be removable at some point.
786 nw="$nw -Wsuggest-attribute=pure" 772 nw="$nw -Wsuggest-attribute=pure"
787 773
774 # clang is unduly picky about some things.
775 AC_CACHE_CHECK([whether the compiler is clang], [emacs_cv_clang],
776 [AC_COMPILE_IFELSE(
777 [AC_LANG_PROGRAM([[
778 #ifndef __clang__
779 #error "not clang"
780 #endif
781 ]])],
782 [emacs_cv_clang=yes],
783 [emacs_cv_clang=no])])
784 if test $emacs_cv_clang = yes; then
785 nw="$nw -Wcast-align"
786 fi
787
788 gl_MANYWARN_ALL_GCC([ws]) 788 gl_MANYWARN_ALL_GCC([ws])
789 gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw]) 789 gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
790 for w in $ws; do 790 for w in $ws; do
@@ -801,6 +801,14 @@ else
801 # gcc 4.5.0 20090517. 801 # gcc 4.5.0 20090517.
802 gl_WARN_ADD([-Wno-logical-op]) 802 gl_WARN_ADD([-Wno-logical-op])
803 803
804 # More things that clang is unduly picky about.
805 if test $emacs_cv_clang = yes; then
806 gl_WARN_ADD([-Wno-format-extra-args])
807 gl_WARN_ADD([-Wno-tautological-constant-out-of-range-compare])
808 gl_WARN_ADD([-Wno-unused-command-line-argument])
809 gl_WARN_ADD([-Wno-unused-value])
810 fi
811
804 gl_WARN_ADD([-fdiagnostics-show-option]) 812 gl_WARN_ADD([-fdiagnostics-show-option])
805 gl_WARN_ADD([-funit-at-a-time]) 813 gl_WARN_ADD([-funit-at-a-time])
806 814
@@ -1604,15 +1612,15 @@ W32_RES_LINK=
1604EMACS_MANIFEST= 1612EMACS_MANIFEST=
1605if test "${with_w32}" != no; then 1613if test "${with_w32}" != no; then
1606 case "${opsys}" in 1614 case "${opsys}" in
1607 cygwin) 1615 cygwin)
1608 AC_CHECK_HEADER([windows.h], [HAVE_W32=yes], 1616 AC_CHECK_HEADER([windows.h], [HAVE_W32=yes],
1609 [AC_MSG_ERROR([`--with-w32' was specified, but windows.h 1617 [AC_MSG_ERROR([`--with-w32' was specified, but windows.h
1610 cannot be found.])]) 1618 cannot be found.])])
1611 ;; 1619 ;;
1612 mingw32) 1620 mingw32)
1613 ## Using --with-w32 with MinGW is a no-op, but we allow it. 1621 ## Using --with-w32 with MinGW is a no-op, but we allow it.
1614 ;; 1622 ;;
1615 *) 1623 *)
1616 AC_MSG_ERROR([Using w32 with an autotools build is only supported for Cygwin and MinGW32.]) 1624 AC_MSG_ERROR([Using w32 with an autotools build is only supported for Cygwin and MinGW32.])
1617 ;; 1625 ;;
1618 esac 1626 esac
@@ -1626,7 +1634,7 @@ if test "${opsys}" = "mingw32"; then
1626 [[void test(PIMAGE_NT_HEADERS pHeader) 1634 [[void test(PIMAGE_NT_HEADERS pHeader)
1627 {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);}]])], 1635 {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);}]])],
1628 [emacs_cv_w32api=yes 1636 [emacs_cv_w32api=yes
1629 HAVE_W32=yes], 1637 HAVE_W32=yes],
1630 emacs_cv_w32api=no) 1638 emacs_cv_w32api=no)
1631 AC_MSG_RESULT($emacs_cv_w32api) 1639 AC_MSG_RESULT($emacs_cv_w32api)
1632 if test "${emacs_cv_w32api}" = "no"; then 1640 if test "${emacs_cv_w32api}" = "no"; then
@@ -2074,6 +2082,7 @@ if test "${opsys}" != "mingw32"; then
2074 USE_GTK_TOOLKIT="GTK3" 2082 USE_GTK_TOOLKIT="GTK3"
2075 if test "x$ac_enable_gtk_deprecation_warnings" = x; then 2083 if test "x$ac_enable_gtk_deprecation_warnings" = x; then
2076 GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS" 2084 GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
2085 GTK_CFLAGS="$GTK_CFLAGS -DGLIB_DISABLE_DEPRECATION_WARNINGS"
2077 fi 2086 fi
2078 else 2087 else
2079 check_gtk2=yes 2088 check_gtk2=yes
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 6ff653b7be6..e565983e147 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,10 @@
12013-05-18 Paul Eggert <eggert@cs.ucla.edu>
2
3 Port --enable-gcc-warnings to clang.
4 * etags.c: Omit unnecessary forward decls.
5 (print_version, print_help): Declare _Noreturn.
6 * pop.c (socket_connection) [HAVE_GETADDRINFO]: Simplify.
7
12013-05-16 Eli Zaretskii <eliz@gnu.org> 82013-05-16 Eli Zaretskii <eliz@gnu.org>
2 9
3 * update-game-score.c [WINDOWSNT]: Include "ntlib.h". 10 * update-game-score.c [WINDOWSNT]: Include "ntlib.h".
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 27a853a954a..f6b173bf465 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -316,15 +316,7 @@ static void Texinfo_nodes (FILE *);
316static void Yacc_entries (FILE *); 316static void Yacc_entries (FILE *);
317static void just_read_file (FILE *); 317static void just_read_file (FILE *);
318 318
319static void print_language_names (void);
320static void print_version (void);
321static void print_help (argument *);
322int main (int, char **);
323
324static compressor *get_compressor_from_suffix (char *, char **);
325static language *get_language_from_langname (const char *); 319static language *get_language_from_langname (const char *);
326static language *get_language_from_interpreter (char *);
327static language *get_language_from_filename (char *, bool);
328static void readline (linebuffer *, FILE *); 320static void readline (linebuffer *, FILE *);
329static long readline_internal (linebuffer *, FILE *); 321static long readline_internal (linebuffer *, FILE *);
330static bool nocase_tail (const char *); 322static bool nocase_tail (const char *);
@@ -346,7 +338,6 @@ static void find_entries (FILE *);
346static void free_tree (node *); 338static void free_tree (node *);
347static void free_fdesc (fdesc *); 339static void free_fdesc (fdesc *);
348static void pfnote (char *, bool, char *, int, int, long); 340static void pfnote (char *, bool, char *, int, int, long);
349static void make_tag (const char *, int, bool, char *, int, int, long);
350static void invalidate_nodes (fdesc *, node **); 341static void invalidate_nodes (fdesc *, node **);
351static void put_entries (node *); 342static void put_entries (node *);
352 343
@@ -816,7 +807,7 @@ etags --help --lang=ada.");
816#ifndef VERSION 807#ifndef VERSION
817# define VERSION "17.38.1.4" 808# define VERSION "17.38.1.4"
818#endif 809#endif
819static void 810static _Noreturn void
820print_version (void) 811print_version (void)
821{ 812{
822 char emacs_copyright[] = COPYRIGHT; 813 char emacs_copyright[] = COPYRIGHT;
@@ -832,7 +823,7 @@ print_version (void)
832# define PRINT_UNDOCUMENTED_OPTIONS_HELP FALSE 823# define PRINT_UNDOCUMENTED_OPTIONS_HELP FALSE
833#endif 824#endif
834 825
835static void 826static _Noreturn void
836print_help (argument *argbuffer) 827print_help (argument *argbuffer)
837{ 828{
838 bool help_for_lang = FALSE; 829 bool help_for_lang = FALSE;
diff --git a/lib-src/pop.c b/lib-src/pop.c
index 1f3f82baa68..a269144c915 100644
--- a/lib-src/pop.c
+++ b/lib-src/pop.c
@@ -1075,28 +1075,22 @@ socket_connection (char *host, int flags)
1075 } 1075 }
1076 } while (ret != 0); 1076 } while (ret != 0);
1077 1077
1078 if (ret == 0) 1078 for (it = res; it; it = it->ai_next)
1079 { 1079 if (it->ai_addrlen == sizeof addr)
1080 it = res; 1080 {
1081 while (it) 1081 struct sockaddr_in *in_a = (struct sockaddr_in *) it->ai_addr;
1082 { 1082 addr.sin_addr = in_a->sin_addr;
1083 if (it->ai_addrlen == sizeof (addr)) 1083 if (! connect (sock, (struct sockaddr *) &addr, sizeof addr))
1084 { 1084 break;
1085 struct sockaddr_in *in_a = (struct sockaddr_in *) it->ai_addr; 1085 }
1086 addr.sin_addr = in_a->sin_addr; 1086 connect_ok = it != NULL;
1087 if (! connect (sock, (struct sockaddr *) &addr, sizeof (addr))) 1087 if (connect_ok)
1088 break; 1088 {
1089 } 1089 realhost = alloca (strlen (it->ai_canonname) + 1);
1090 it = it->ai_next; 1090 strcpy (realhost, it->ai_canonname);
1091 }
1092 connect_ok = it != NULL;
1093 if (connect_ok)
1094 {
1095 realhost = alloca (strlen (it->ai_canonname) + 1);
1096 strcpy (realhost, it->ai_canonname);
1097 }
1098 freeaddrinfo (res);
1099 } 1091 }
1092 freeaddrinfo (res);
1093
1100#else /* !HAVE_GETADDRINFO */ 1094#else /* !HAVE_GETADDRINFO */
1101 do 1095 do
1102 { 1096 {
diff --git a/src/ChangeLog b/src/ChangeLog
index 6909367dccb..e1f7a56aede 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,16 @@
12013-05-18 Paul Eggert <eggert@cs.ucla.edu>
2
3 Port --enable-gcc-warnings to clang.
4 * bytecode.c (exec_byte_code):
5 * regex.c:
6 Redo diagnostic pragmas to pacify clang, too.
7 * dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable.
8 * editfns.c (Fencode_time):
9 * fileio.c (file_accessible_directory_p):
10 * font.c (font_unparse_xlfd):
11 Use '&"string"[index]' instead of '"string" + (index)'.
12 * undo.c (user_error): Remove; unused.
13
12013-05-16 Eli Zaretskii <eliz@gnu.org> 142013-05-16 Eli Zaretskii <eliz@gnu.org>
2 15
3 * insdel.c (insert_1_both): Document the arguments, instead of 16 * insdel.c (insert_1_both): Document the arguments, instead of
diff --git a/src/bytecode.c b/src/bytecode.c
index 7676c8550a4..4940fd5c182 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -660,9 +660,12 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
660 the table clearer. */ 660 the table clearer. */
661#define LABEL(OP) [OP] = &&insn_ ## OP 661#define LABEL(OP) [OP] = &&insn_ ## OP
662 662
663#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) 663#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
664# pragma GCC diagnostic push 664# pragma GCC diagnostic push
665# pragma GCC diagnostic ignored "-Woverride-init" 665# pragma GCC diagnostic ignored "-Woverride-init"
666#elif defined __clang__
667# pragma GCC diagnostic push
668# pragma GCC diagnostic ignored "-Winitializer-overrides"
666#endif 669#endif
667 670
668 /* This is the dispatch table for the threaded interpreter. */ 671 /* This is the dispatch table for the threaded interpreter. */
@@ -676,7 +679,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
676#undef DEFINE 679#undef DEFINE
677 }; 680 };
678 681
679#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) 682#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) || defined __clang__
680# pragma GCC diagnostic pop 683# pragma GCC diagnostic pop
681#endif 684#endif
682 685
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 863f7634eb5..3ec3c28431b 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -882,7 +882,7 @@ xd_retrieve_arg (int dtype, DBusMessageIter *iter)
882#endif 882#endif
883 { 883 {
884 dbus_uint32_t val; 884 dbus_uint32_t val;
885 unsigned int pval = val; 885 unsigned int pval;
886 dbus_message_iter_get_basic (iter, &val); 886 dbus_message_iter_get_basic (iter, &val);
887 pval = val; 887 pval = val;
888 XD_DEBUG_MESSAGE ("%c %u", dtype, pval); 888 XD_DEBUG_MESSAGE ("%c %u", dtype, pval);
diff --git a/src/editfns.c b/src/editfns.c
index e0b0347fe69..cc6b4cff895 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1946,7 +1946,7 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */)
1946 EMACS_INT zone_hr = abszone / (60*60); 1946 EMACS_INT zone_hr = abszone / (60*60);
1947 int zone_min = (abszone/60) % 60; 1947 int zone_min = (abszone/60) % 60;
1948 int zone_sec = abszone % 60; 1948 int zone_sec = abszone % 60;
1949 sprintf (tzbuf, tzbuf_format, "-" + (XINT (zone) < 0), 1949 sprintf (tzbuf, tzbuf_format, &"-"[XINT (zone) < 0],
1950 zone_hr, zone_min, zone_sec); 1950 zone_hr, zone_min, zone_sec);
1951 tzstring = tzbuf; 1951 tzstring = tzbuf;
1952 } 1952 }
diff --git a/src/fileio.c b/src/fileio.c
index fe1bce16ca0..f20721251e6 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2873,7 +2873,7 @@ file_accessible_directory_p (char const *file)
2873 and it's a safe optimization here. */ 2873 and it's a safe optimization here. */
2874 char *buf = SAFE_ALLOCA (len + 3); 2874 char *buf = SAFE_ALLOCA (len + 3);
2875 memcpy (buf, file, len); 2875 memcpy (buf, file, len);
2876 strcpy (buf + len, "/." + (file[len - 1] == '/')); 2876 strcpy (buf + len, &"/."[file[len - 1] == '/']);
2877 dir = buf; 2877 dir = buf;
2878 } 2878 }
2879 2879
diff --git a/src/font.c b/src/font.c
index ad601177b50..7bd44a5e52f 100644
--- a/src/font.c
+++ b/src/font.c
@@ -1219,7 +1219,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
1219 return -1; 1219 return -1;
1220 f[j] = p = alloca (alloc); 1220 f[j] = p = alloca (alloc);
1221 sprintf (p, "%s%s-*", SDATA (val), 1221 sprintf (p, "%s%s-*", SDATA (val),
1222 "*" + (SDATA (val)[SBYTES (val) - 1] == '*')); 1222 &"*"[SDATA (val)[SBYTES (val) - 1] == '*']);
1223 } 1223 }
1224 else 1224 else
1225 f[j] = SSDATA (val); 1225 f[j] = SSDATA (val);
@@ -1618,7 +1618,7 @@ font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes)
1618 } 1618 }
1619 if (point_size > 0) 1619 if (point_size > 0)
1620 { 1620 {
1621 int len = snprintf (p, lim - p, "-%d" + (p == name), point_size); 1621 int len = snprintf (p, lim - p, &"-%d"[p == name], point_size);
1622 if (! (0 <= len && len < lim - p)) 1622 if (! (0 <= len && len < lim - p))
1623 return -1; 1623 return -1;
1624 p += len; 1624 p += len;
diff --git a/src/regex.c b/src/regex.c
index 04429386f84..79fb28ba12a 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -33,10 +33,9 @@
33 33
34/* Ignore some GCC warnings for now. This section should go away 34/* Ignore some GCC warnings for now. This section should go away
35 once the Emacs and Gnulib regex code is merged. */ 35 once the Emacs and Gnulib regex code is merged. */
36#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) 36#if 4 < __GNUC__ + (5 <= __GNUC_MINOR__) || defined __clang__
37# pragma GCC diagnostic ignored "-Wstrict-overflow" 37# pragma GCC diagnostic ignored "-Wstrict-overflow"
38# ifndef emacs 38# ifndef emacs
39# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
40# pragma GCC diagnostic ignored "-Wunused-function" 39# pragma GCC diagnostic ignored "-Wunused-function"
41# pragma GCC diagnostic ignored "-Wunused-macros" 40# pragma GCC diagnostic ignored "-Wunused-macros"
42# pragma GCC diagnostic ignored "-Wunused-result" 41# pragma GCC diagnostic ignored "-Wunused-result"
@@ -44,6 +43,10 @@
44# endif 43# endif
45#endif 44#endif
46 45
46#if 4 < __GNUC__ + (5 <= __GNUC_MINOR__) && ! defined __clang__
47# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
48#endif
49
47#include <config.h> 50#include <config.h>
48 51
49#include <stddef.h> 52#include <stddef.h>
diff --git a/src/undo.c b/src/undo.c
index 63edc8e9b8d..d8711882fbf 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -445,12 +445,6 @@ truncate_undo_list (struct buffer *b)
445 unbind_to (count, Qnil); 445 unbind_to (count, Qnil);
446} 446}
447 447
448static _Noreturn void
449user_error (const char *msg)
450{
451 xsignal1 (Quser_error, build_string (msg));
452}
453
454 448
455void 449void
456syms_of_undo (void) 450syms_of_undo (void)