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
657bca99
Commit
657bca99
authored
Apr 14, 2014
by
Thomas Jahns
🤸
Browse files
Add const declaration to immutable data.
parent
43aab0e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cdi_int.c
View file @
657bca99
...
...
@@ -45,7 +45,7 @@ int cdiPartabIntern = 1;
double
cdiDefaultMissval
=
-
9.E33
;
char
*
Filetypes
[]
=
{
const
char
Filetypes
[]
[
9
]
=
{
"UNKNOWN"
,
"GRIB"
,
"GRIB2"
,
...
...
@@ -274,9 +274,9 @@ void cdiInitialize(void)
}
char
*
strfiletype
(
int
filetype
)
const
char
*
strfiletype
(
int
filetype
)
{
char
*
name
;
const
char
*
name
;
int
size
=
(
int
)
(
sizeof
(
Filetypes
)
/
sizeof
(
char
*
));
if
(
filetype
>
0
&&
filetype
<
size
)
...
...
src/cdi_int.h
View file @
657bca99
...
...
@@ -296,7 +296,7 @@ int stream_new_var(stream_t *streamptr, int gridID, int zaxisID);
int
tstepsNewEntry
(
stream_t
*
streamptr
);
char
*
strfiletype
(
int
filetype
);
const
char
*
strfiletype
(
int
filetype
);
void
cdi_generate_vars
(
stream_t
*
streamptr
);
...
...
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