Skip to contentSkip to conversation

msvc: Fix a compiler warning due to an incorrect pointer cast

PATCH Superseded Ramsay Jones 2 participants 2 messages Jun 15, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 3/4 msvc: Fix a compiler warning due to an incorrect pointer cast

---

The warning in question being:

    .../regex.c(2811) : warning C4047: '=' : 'regoff_t *' differs in levels \

of indirection from 'int'

Note also that the final line of context in the diff below contains an ^L character, which will hopefully find it's way to the list...

ATB,
Ramsay Jones

 compat/regex/regex.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
compat/regex/regex.c +1 -1
index 67d5c37..556d8ab 100644
@@ -2808,7 +2808,7 @@ re_set_registers (bufp, regs, num_regs, starts, ends)
     {
       bufp->regs_allocated = REGS_UNALLOCATED;
       regs->num_regs = 0;
-      regs->start = regs->end = (regoff_t) 0;
+      regs->start = regs->end = (regoff_t *) 0;
     }
 }
 
Signature · 1 line
1.6.6
Acked-by on v1 3/4
#1 lore raw
Quoted 10 lines · Ramsay Jones

---

The warning in question being:

     .../regex.c(2811) : warning C4047: '=' : 'regoff_t *' differs in levels \

of indirection from 'int'

Note also that the final line of context in the diff below contains an ^L character, which will hopefully find it's way to the list...

Signature · 1 line
Sebastian Schuberth