Re: urmaslt - r29621 - abiword/trunk/plugins/mswrite/xp

From: Hubert Figuiere <hfiguiere_at_teaser.fr>
Date: Fri Mar 04 2011 - 05:22:34 CET

On 11-03-03 7:48 AM, Jean Brefort wrote:
> same thing at line 295:
> static struct cst_data {
> char *suffix;
> char *cpid;
> } cp_suf_tbl[]={
> {"\x04 cyr","CP1251"},
> {"\x03 ce","CP1250"},
> {NULL,NULL}
> };
>
> In that case const char* is probably better. I'm not sure that these
> will be freed at any time, but this would make gcc happy.

They are static data (literal strings), therefore:

1. gcc will complain that they get assigned to a char *
2. the reside in the data segment. No alloc nor free required.

Also the whole array is const, so mark it as seach.

Hub
Received on Fri Mar 4 05:22:46 2011

This archive was generated by hypermail 2.1.8 : Fri Mar 04 2011 - 05:22:46 CET