From 3f83bf3784d49e162532212230a271a8cc8edbf0 Mon Sep 17 00:00:00 2001 From: Frank Li Date: Wed, 16 Sep 2009 10:20:19 +0200 Subject: Change regerror() declaration from K&R style to ANSI C (C89) The MSVC headers typedef errcode as int, and thus confused the compiler in the K&R style definition. ANSI style deconfuses it. Signed-off-by: Frank Li Signed-off-by: Marius Storm-Olsen Acked-by: Johannes Sixt Signed-off-by: Junio C Hamano --- compat/regex/regex.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'compat/regex/regex.c') diff --git a/compat/regex/regex.c b/compat/regex/regex.c index 5ea007567d..67d5c370a0 100644 --- a/compat/regex/regex.c +++ b/compat/regex/regex.c @@ -4852,11 +4852,8 @@ regexec (preg, string, nmatch, pmatch, eflags) from either regcomp or regexec. We don't use PREG here. */ size_t -regerror (errcode, preg, errbuf, errbuf_size) - int errcode; - const regex_t *preg; - char *errbuf; - size_t errbuf_size; +regerror(int errcode, const regex_t *preg, + char *errbuf, size_t errbuf_size) { const char *msg; size_t msg_size; -- cgit v1.2.3 From 3521c1bf5bd9323567715b3e8b369075a7f50ec1 Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Wed, 20 Jan 2010 19:34:14 +0000 Subject: msvc: Fix a compiler warning due to an incorrect pointer cast Signed-off-by: Ramsay Jones Acked-by: Sebastian Schuberth Signed-off-by: Junio C Hamano --- compat/regex/regex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compat/regex/regex.c') diff --git a/compat/regex/regex.c b/compat/regex/regex.c index 67d5c370a0..556d8ab11f 100644 --- a/compat/regex/regex.c +++ b/compat/regex/regex.c @@ -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; } } -- cgit v1.2.3