Mon, Aug 14 2006
21:12:47
|
|
Request created by guest
|
|
Subject: lib/gis/color_str.c does not compile
Platform: Solaris2.x/Sparc
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: cvs checkout 20060814
When compiling with Sun C 5.5 2003/03/12 the following error is reported from
file color_str.c in lib/gis/:
"color_str.c", line 54: zero or negative subscript
"color_str.c", line 57: warning: syntax error: empty initializer
"color_str.c", line 112: warning: statement not reached
cc: acomp failed for color_str.c
A workaround is to change row 46:
#define NUM_COLORS 1
and to uncomment line 56 to have one value in the table:
{"purple", 128, 0, 255}
It seems that a static construct without explicit initialization is not legal,
at least in this compilers opinion.
Harri K. |
|
Tue, Aug 15 2006
05:07:17
|
|
Mail sent by glynn@gclements.plus.com
|
|
Return-Path |
<glynn@gclements.plus.com>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
From |
Glynn Clements <glynn@gclements.plus.com>
|
MIME-Version |
1.0
|
Content-Type |
text/plain; charset=us-ascii
|
Content-Transfer-Encoding |
7bit
|
Message-ID |
<17633.14945.637209.284887@cerise.gclements.plus.com>
|
Date |
Tue, 15 Aug 2006 04:07:13 +0100
|
To |
Request Tracker <grass-bugs@intevation.de>
|
Cc |
grass-dev@grass.itc.it
|
Subject |
Re: [GRASS-dev] [bug #5002] (grass) lib/gis/color_str.c does not compile
|
In-Reply-To |
<20060814191247.9BF3E1006D6@lists.intevation.de>
|
References |
<20060814191247.9BF3E1006D6@lists.intevation.de>
|
X-Mailer |
VM 7.07 under 21.4 (patch 15) "Security Through Obscurity" XEmacs Lucid
|
X-Virus-Scanned |
by amavisd-new at intevation.de
|
X-Spam-Status |
No, hits=-3.922 tagged_above=-999 required=3 tests=[AWL=1.078, BAYES_00=-5]
|
X-Spam-Level |
|
Request Tracker wrote:
> this bug's URL: http://intevation.de/rt/webrt?serial_num=5002
> -------------------------------------------------------------------------
>
> Subject: lib/gis/color_str.c does not compile
>
> Platform: Solaris2.x/Sparc
> grass obtained from: CVS
> grass binary for platform: Compiled from Sources
> GRASS Version: cvs checkout 20060814
>
> When compiling with Sun C 5.5 2003/03/12 the following error is reported from
file color_str.c in lib/gis/:
>
> "color_str.c", line 54: zero or negative subscript
> "color_str.c", line 57: warning: syntax error: empty initializer
> "color_str.c", line 112: warning: statement not reached
> cc: acomp failed for color_str.c
>
> A workaround is to change row 46:
> #define NUM_COLORS 1
>
> and to uncomment line 56 to have one value in the table:
> {"purple", 128, 0, 255}
>
> It seems that a static construct without explicit initialization is not legal,
at least in this compilers opinion.
Zero-size arrays aren't legal C; they're a gcc extension.
It appears that the code in question was left in as "documentation" of
the previous behaviour.
Fixed in CVS.
--
Glynn Clements <glynn@gclements.plus.com>
|
|
Tue, Aug 15 2006
14:58:25
|
|
Status changed to resolved by mneteler
|
|