Added explicit initialization to address some potential issues raised by clang static analysis.
@@ -253,6 +253,10 @@ TestFunc(var)_$1(VarArgs)
double expect[MAX_NELS];
$1 value[MAX_NELS];
+ for(j = 0; j < MAX_NELS; j++) {
+ expect[j] = 0;
+ }
+
err = FileOpen(testfile, NC_NOWRITE);
IF (err != NC_NOERR) error("open: %s", APIFunc(strerror)(err));
@@ -376,6 +380,10 @@ TestFunc(vara)_$1(VarArgs)
double expect[MAX_NELS];
$1 value[MAX_NELS];
+ for(j = 0; j < MAX_NELS; j++) {
+ expect[j] = 0;
+ }
+
err = FileOpen(testfile, NC_NOWRITE);
IF (err != NC_NOERR) error("open: %s", APIFunc(strerror)(err));
@@ -635,6 +643,10 @@ TestFunc(vars)_$1(VarArgs)
double expect[MAX_NELS];
$1 value[MAX_NELS];
+ for(j = 0; j < MAX_NELS; j++) {
+ expect[j] = 0;
+ }
+
err = FileOpen(testfile, NC_NOWRITE);
IF (err != NC_NOERR) error("open: %s", APIFunc(strerror)(err));
@@ -928,6 +940,10 @@ TestFunc(varm)_$1(VarArgs)
double expect[MAX_NELS];
$1 value[MAX_NELS];
+ for(j = 0; j < MAX_NELS; j++) {
+ expect[j] = 0;
+ }
+
err = FileOpen(testfile, NC_NOWRITE);
IF (err != NC_NOERR) error("open: %s", APIFunc(strerror)(err));
@@ -1221,6 +1237,10 @@ TestFunc(att)_$1(AttVarArgs)
double expect[MAX_NELS];
$1 value[MAX_NELS];
+ for(j = 0; j < MAX_NELS; j++) {
+ expect[j] = 0;
+ }
+
err = FileOpen(testfile, NC_NOWRITE);
IF (err != NC_NOERR) error("open: %s", APIFunc(strerror)(err));
