Re: slaroche - r31392 - abiword/trunk/src/text/ptbl/xp

Simon Larochelle <[email protected]>
Newsgroups gmane.editors.abiword.devel
Message-ID <CAF8-HjG_MnPEO+BPA5+9U9a8LLCsaVkqAJoaQXOFSmyQwfK6Dg@mail.gmail.com>
The problem should be fixed (rev. 31416). I used UT_calloc.

Simon

On Mon, Jun 25, 2012 at 1:06 AM, Hubert Figuière <[email protected]> wrote:
>
>
>>> -// Finally make the const gchar * array of properties
>>> -//
>>> -               const gchar ** sProps = NULL;
>>> -               UT_uint32 countp = vProps.getItemCount() + 1;
>>> -               sProps = (const gchar **) UT_calloc(countp, sizeof(gchar *));
>>> -               countp--;
>>> -               UT_uint32 i;
>>> -               for(i=0; i<countp; i++)
>>> +               const gchar * attrNoStyle[2*countAttr+1];
>>
>>
>> I'm getting an error at the above line in the Windows build :
>>
>> 1>..\..\src\text\ptbl\xp\pt_PT_ChangeStrux.cpp(576) : error C2057:
>> expected constant expression
>> 1>..\..\src\text\ptbl\xp\pt_PT_ChangeStrux.cpp(576) : error C2466:
>> cannot allocate an array of constant size 0
>> 1>..\..\src\text\ptbl\xp\pt_PT_ChangeStrux.cpp(576) : error C2133:
>> 'attrNoStyle' : unknown size
>
> These are GNU C extensions (the use of a non constant value for an array
> size). Please avoid them.
>
> Thanks,
>
> Hub
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.