From 171c09d9ea74dc1ba1699ec6f13c75fc3bc81d64 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 12 Nov 2011 10:05:52 +0100 Subject: build: fix compilation error on MSVC 9 to due Pexecute() declaration * src/pcresearch.c (WITHOUT_PCRE_NORETURN): Remove macro. (Pexecute): Replace abort() call with code that does not trigger GCC warnings. --- src/pcresearch.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/pcresearch.c b/src/pcresearch.c index 5ccc6269..7b865f54 100644 --- a/src/pcresearch.c +++ b/src/pcresearch.c @@ -101,19 +101,14 @@ Pcompile (char const *pattern, size_t size) #endif } -/* Pexecute is a no-return function when building --without-pcre. */ -#if !HAVE_LIBPCRE -# define WITHOUT_PCRE_NORETURN _Noreturn -#else -# define WITHOUT_PCRE_NORETURN /* empty */ -#endif - -size_t WITHOUT_PCRE_NORETURN +size_t Pexecute (char const *buf, size_t size, size_t *match_size, char const *start_ptr) { #if !HAVE_LIBPCRE - abort (); + /* We can't get here, because Pcompile would have been called earlier. */ + error (EXIT_TROUBLE, 0, _("internal error")); + return -1; #else /* This array must have at least two elements; everything after that is just for performance improvement in pcre_exec. */ -- cgit v1.2.1