Re: [pcre-dev] [Bug 821] New: Unused struct members

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: 821
CC: pcre-dev
Subject: Re: [pcre-dev] [Bug 821] New: Unused struct members
On Tue, 10 Mar 2009, bill wrote:

> Using cppcheck 1.30 against PCRE 7.8 yields:
>
> # cppcheck -s -q .
> [pcre_exec.c:337]: (style) struct or union member 'heapframe::Xcharptr' is
> never
> used
> [pcre_exec.c:359]: (style) struct or union member 'heapframe::Xoclength' is
> never used
> [pcre_exec.c:360]: (style) struct or union member 'heapframe::Xocchars' is
> never
> used
>
>
> This is not really a bug but just pointing out some possible unnecessary
> members of the struct "heapframe"
>
> I commented them out and tested with default settings and with SUPPORT_UCP
> defined with no compilation errors.


I'll check; thanks for the report. Are you compiling with
--disable-stack-for-recursion? That's the only time that heapframe
should be used. However, the logic is contorted, to say the least. :-)

> On another note, I could only build with SUPPORT_UCP defined if I also defined
> SUPPORT_UTF8=1. That might actually be a bug?


No; it is necessary to have SUPPORT_UTF8 in order to have SUPPORT_UCP.
If you use the ./configure system, that happens automatically.

Philip

--
Philip Hazel