[GRASS-dev] i.pca errors compiling GRASS 6.4 release branch
Markus Neteler
neteler at osgeo.org
Thu May 15 10:09:00 PDT 2014
On Wed, May 14, 2014 at 8:52 PM, Michael Barton <Michael.Barton at asu.edu> wrote:
> Here is the error message. Any thoughts or does this need a ticket?
>
> Errors in:
> /Users/cmbarton/Dropbox/GRASS_dropbox/source/grass64_rb/imagery/i.pca
...
> support.c:79:5: error: void function 'write_history' should not return a
> value [-Wreturn-type]
> return G_write_history(outname, &hist);
> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 1 warning and 1 error generated.
> make: *** [OBJ.x86_64-apple-darwin13.1.0/support.o] Error 1
The function is declared void
22 static void write_history(int bands, char *outname, double
**eigmat, double *eigval)
23 {
24 int i, j;
...
but returns:
58 return G_write_history(outname, &hist);
59 }
Attached a proposal for fix by simply deleting the "return" (I
compared to grass70/imagery/i.pca/support.c).
Will that help?
Markus
-------------- next part --------------
Index: imagery/i.pca/support.c
===================================================================
--- imagery/i.pca/support.c (revision 60222)
+++ imagery/i.pca/support.c (working copy)
@@ -76,5 +76,5 @@
/* only write to stderr the first time (this fn runs for every output map) */
first_map = FALSE;
- return G_write_history(outname, &hist);
+ G_write_history(outname, &hist);
}
More information about the grass-dev
mailing list