Commit dc7f58d6 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Fix scan-build warning: 1st function call argument is an uninitialized value.

parent 8fd64b9e
......@@ -363,6 +363,8 @@ bool cdfCheckAttText(int fileID, int ncvarid, const char *attname)
static
void cdfGetAttText(int fileID, int ncvarid, const char *attname, size_t attlen, char *atttext)
{
atttext[0] = 0;
nc_type atttype;
size_t nc_attlen;
......@@ -381,10 +383,6 @@ void cdfGetAttText(int fileID, int ncvarid, const char *attname, size_t attlen,
attbuf[nc_attlen++] = 0;
memcpy(atttext, attbuf, nc_attlen);
}
else
{
atttext[0] = 0;
}
}
#ifdef HAVE_NETCDF4
else if ( atttype == NC_STRING )
......@@ -401,10 +399,6 @@ void cdfGetAttText(int fileID, int ncvarid, const char *attname, size_t attlen,
atttext[ssize - 1] = 0;
Free(attbuf);
}
else
{
atttext[0] = 0;
}
}
#endif
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment