Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
9d386a23
Commit
9d386a23
authored
Oct 17, 2019
by
Uwe Schulzweida
Browse files
Fix gcc warning.
parent
b99164fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cdf_write.c
View file @
9d386a23
...
...
@@ -179,7 +179,7 @@ void cdfDefineCellMethods(stream_t *streamptr, int cdiID, int varID, int fileID,
int
stepType
=
vlistInqVarTsteptype
(
cdiID
,
varID
);
char
*
cellMethod
=
NULL
;
const
char
*
cellMethod
=
NULL
;
if
(
stepType
==
TSTEP_AVG
)
cellMethod
=
"mean"
;
else
if
(
stepType
==
TSTEP_SUM
)
cellMethod
=
"sum"
;
else
if
(
stepType
==
TSTEP_RANGE
)
cellMethod
=
"range"
;
...
...
@@ -188,7 +188,7 @@ void cdfDefineCellMethods(stream_t *streamptr, int cdiID, int varID, int fileID,
if
(
cellMethod
)
{
char
*
attname
=
"cell_methods"
;
const
char
*
attname
=
"cell_methods"
;
char
atttxt
[
CDI_MAX_NAME
+
1
];
sprintf
(
atttxt
,
"%s: %s"
,
timeVarName
,
cellMethod
);
cdf_put_att_text
(
fileID
,
ncvarID
,
attname
,
strlen
(
atttxt
),
atttxt
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment