James Supancic wrote:
> In resource_name_translation, in terrain.c you are altering the value
> of a const parameter.
> This is not allowed, and gcc 4.1 tells us this with:
> terrain.c: In function 'resource_name_translation':
> terrain.c:244: error: assignment of read-only location
> I'm not sure how this should be fixed? Maybe just remove the const
> type specifier? It was working fine before, then I did "svn up" and it
It's only a warning here, you must have stricter compliance turned on.
(I noted the warning in a comment in the code.)
Actually, it's initializing a component of the structure, which certainly
*always* has to be done at some point!
The problem is that somebody prior to me declared the enclosing array const,
when it's clearly not. I'll fix it today.
Freeciv-dev mailing list