Commit fd2388d4 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Remove return value from function.

* cdfReadVarSliceDP always returned 0 because the callee terminates
  instead of returning an error code.
parent 6d7cdfd5
......@@ -1739,12 +1739,9 @@ void cdiStreamReadVarSlice(int streamID, int varID, int levelID, int memtype, vo
case FILETYPE_NC2:
case FILETYPE_NC4:
case FILETYPE_NC4C:
{
if ( memtype == MEMTYPE_FLOAT ) Error("cdfReadVarSlice not implemented for memtype float!");
/* FIXME: status value ignored */
int ierr = cdfReadVarSliceDP(streamptr, varID, levelID, data, nmiss);
break;
}
if ( memtype == MEMTYPE_FLOAT ) Error("cdfReadVarSlice not implemented for memtype float!");
cdfReadVarSliceDP(streamptr, varID, levelID, data, nmiss);
break;
#endif
default:
{
......
......@@ -3994,7 +3994,7 @@ int set_validrange(long gridsize, double *data, double missval, double validmin,
}
int cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data, int *nmiss)
void cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data, int *nmiss)
{
#if defined (HAVE_LIBNETCDF)
int fileID;
......@@ -4231,7 +4231,6 @@ int cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data,
}
#endif
return (0);
}
......
......@@ -20,7 +20,7 @@ void cdf_write_record(stream_t *streamptr, int memtype, const void *data, int
void cdfReadVarDP(stream_t *streamptr, int varID, double *data, int *nmiss);
void cdf_write_var(stream_t *streamptr, int varID, int memtype, const void *data, int nmiss);
int cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data, int *nmiss);
void cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data, int *nmiss);
int cdf_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, const void *data, int nmiss);
void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
......
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