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

From: Simon Larochelle <larochelle.simon.1_at_gmail.com>
Date: Mon Jun 25 2012 - 12:57:14 CEST

The problem should be fixed (rev. 31416). I used UT_calloc.

Simon

On Mon, Jun 25, 2012 at 1:06 AM, Hubert Figuière <hfiguiere@teaser.fr> 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
Received on Mon Jun 25 12:57:33 2012

This archive was generated by hypermail 2.1.8 : Mon Jun 25 2012 - 12:57:33 CEST