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

From: Hubert Figuière <hfiguiere_at_teaser.fr>
Date: Mon Jun 25 2012 - 07:06:38 CEST

>> -// 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 07:06:49 2012

This archive was generated by hypermail 2.1.8 : Mon Jun 25 2012 - 07:06:49 CEST