[PATCH] Re: 'make' warning
[email protected] ("Jerry D. Hedden")
| Newsgroups | perl.perl5.porters |
|---|---|
| Message-ID | <[email protected]> |
Attached patch fixes this. On Mon, Jun 7, 2010 at 14:42, Jerry D. Hedden <[email protected]> wrote: > Warning during 'make': > > `sh cflags "optimize='-Os -pipe -funit-at-a-time -march=pentium4 > -mfpmath=sse -mieee-fp -mmmx -msse -msse2'" utf8.o` utf8.c > CCCMD = gcc -DPERL_CORE -c -DPERL_USE_SAFE_PUTENV > -U__STRICT_ANSI__ -DNO_MATHOMS -fno-strict-aliasing -pipe -Os -pipe > -funit-at-a-time -march=pentium4 -mfpmath=sse -mieee-fp -mmmx -msse > -msse2 -Wall -W -Wextra -Wdeclaration-after-statement -Wendif-labels > utf8.c: In function `Perl_foldEQ_utf8': > utf8.c:2591: warning: empty body in an else-statement > utf8.c:2598: warning: empty body in an else-statement >
0001-Silence-build-warnings-in-utf8.c-when-not-in-DEBUGGI.patch
(application/octet-stream, 913 B)
From ac8b25531adf5814d674ffcba74017e33c85978e Mon Sep 17 00:00:00 2001 From: Jerry D. Hedden <[email protected]> Date: Mon, 7 Jun 2010 17:07:52 -0400 Subject: [PATCH] Silence build warnings in utf8.c when not in DEBUGGING --- utf8.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/utf8.c b/utf8.c index 1f4192f..414fac6 100644 --- a/utf8.c +++ b/utf8.c @@ -2588,14 +2588,18 @@ Perl_foldEQ_utf8(pTHX_ const char *s1, char **pe1, register UV l1, bool u1, cons * only go as far as the goal */ e1 = g1; } +#ifdef DEBUGGING else assert(e1); /* Must have an end for looking at s1 */ +#endif /* Same for goal for s2 */ if (g2) { assert(! e2 || e2 >= g2); e2 = g2; } +#ifdef DEBUGGING else assert(e2); +#endif /* Look through both strings, a character at a time */ while (p1 < e1 && p2 < e2) { -- 1.6.1.2