File netcdf-codecleanup.patch of Package netcdf

Index: ncdump/vardata.c
===================================================================
--- ncdump/vardata.c.orig	2009-02-14 21:44:16.000000000 +0100
+++ ncdump/vardata.c	2010-11-30 12:05:12.576895864 +0100
@@ -73,7 +73,7 @@ print_any_att_val (
     const void *valp		/* pointer to the value */
 	    ) {
     nctype_t *typ = attp->tinfo;
-    (void *) (*typ->typ_tostring)(typ, sb, valp);
+    (*typ->typ_tostring)(typ, sb, valp);
 }
 
 
@@ -95,7 +95,7 @@ print_any_val(
 				     (const void*)varp->fillvalp, valp) ) {
 	sbuf_cpy(sb, FILL_STRING);
     } else {
-	(void *) (*varp->val_tostring)(varp, sb, valp);
+	(*varp->val_tostring)(varp, sb, valp);
     }
 }
 
@@ -660,7 +660,7 @@ vardatax(
 	 * exceed the capacity of some platforms), we break each row
 	 * into smaller chunks, if necessary.
 	 */
-	size_t corsav;
+	size_t corsav = 0;
 	int left = (int)ncols;
 	boolean lastrow;
 
Index: ncgen/load.c
===================================================================
--- ncgen/load.c.orig	2008-07-25 20:50:55.000000000 +0200
+++ ncgen/load.c	2010-11-30 12:18:31.944884840 +0100
@@ -13,6 +13,10 @@
 #include "ncgen.h"
 #include "genlib.h"
 
+#ifndef HAVE_STRLCAT
+extern size_t strlcat(char *dst, const char *src, size_t siz);
+#endif
+
 extern int netcdf_flag;
 extern int c_flag;
 extern int fortran_flag;
openSUSE Build Service is sponsored by