[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 c2a1792: * src/regex.c (re_search_2): Make new co
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] emacs-25 c2a1792: * src/regex.c (re_search_2): Make new code safe for -Wjump-misses-init. |
Date: |
Sun, 23 Oct 2016 08:01:28 +0000 (UTC) |
branch: emacs-25
commit c2a17924a57483d14692c8913edbe8ad24b5ffbb
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
* src/regex.c (re_search_2): Make new code safe for -Wjump-misses-init.
---
src/regex.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/regex.c b/src/regex.c
index daa15ec..b12e95b 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -4380,6 +4380,10 @@ re_search_2 (struct re_pattern_buffer *bufp, const char
*str1, size_t size1,
/* Loop through the string, looking for a place to start matching. */
for (;;)
{
+ ptrdiff_t offset1, offset2;
+ re_char *orig_base;
+ bool might_relocate;
+
/* If the pattern is anchored,
skip quickly past places we cannot match.
We don't bother to treat startpos == 0 specially
@@ -4498,10 +4502,9 @@ re_search_2 (struct re_pattern_buffer *bufp, const char
*str1, size_t size1,
/* re_match_2_internal may allocate, relocating the Lisp text
object that we're searching. */
- ptrdiff_t offset1, offset2;
IF_LINT (offset2 = 0); /* Work around GCC bug 78081. */
- re_char *orig_base = STR_BASE_PTR (re_match_object);
- bool might_relocate = orig_base != NULL;
+ orig_base = STR_BASE_PTR (re_match_object);
+ might_relocate = orig_base != NULL;
if (might_relocate)
{
if (string1) offset1 = string1 - orig_base;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 c2a1792: * src/regex.c (re_search_2): Make new code safe for -Wjump-misses-init.,
Paul Eggert <=