summaryrefslogtreecommitdiff
path: root/src/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regex.c')
-rw-r--r--src/regex.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/regex.c b/src/regex.c
index 0f9150193ec..d16a5148054 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -33,6 +33,19 @@
#pragma alloca
#endif
+/* Ignore some GCC warnings for now. This section should go away
+ once the Emacs and Gnulib regex code is merged. */
+#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wstrict-overflow"
+# ifndef emacs
+# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+# pragma GCC diagnostic ignored "-Wunused-function"
+# pragma GCC diagnostic ignored "-Wunused-macros"
+# pragma GCC diagnostic ignored "-Wunused-result"
+# pragma GCC diagnostic ignored "-Wunused-variable"
+# endif
+#endif
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -198,7 +211,7 @@
/* When used in Emacs's lib-src, we need xmalloc and xrealloc. */
-void *
+static void *
xmalloc (size_t size)
{
register void *val;
@@ -211,7 +224,7 @@ xmalloc (size_t size)
return val;
}
-void *
+static void *
xrealloc (void *block, size_t size)
{
register void *val;