Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
86fe2edb
Commit
86fe2edb
authored
Apr 07, 2020
by
Uwe Schulzweida
Browse files
Fix cppcheck error: Uninitialized variable.
parent
3542db88
Changes
10
Show whitespace changes
Inline
Side-by-side
src/XTimstat.cc
View file @
86fe2edb
...
...
@@ -90,11 +90,8 @@ enum
YEAR_LEN
=
10
};
class
ReadArguments
struct
ReadArguments
{
public:
ReadArguments
(
FieldVector2D
&
input_vars
)
:
vars
(
input_vars
){};
~
ReadArguments
(){};
int
tsIDnext
;
#ifdef USE_CDI_STREAM
int
streamID
;
...
...
@@ -104,6 +101,8 @@ public:
int
nrecs
;
RecordInfo
*
recList
;
FieldVector2D
&
vars
;
ReadArguments
(
FieldVector2D
&
input_vars
)
:
vars
(
input_vars
),
tsIDnext
(
0
),
nrecs
(
0
),
recList
(
nullptr
)
{};
};
static
int
num_recs
=
0
;
...
...
src/cdoStream.cc
View file @
86fe2edb
...
...
@@ -31,12 +31,14 @@ CdoStream::~CdoStream() {}
CdoStream
::
CdoStream
()
:
m_cdoStreamID
(
nextCdoStreamID
++
)
{
isopen
=
false
;
ispipe
=
false
;
m_vlistID
=
-
1
;
m_tsID
=
-
1
;
m_filetype
=
CDI_UNDEFID
;
m_name
=
""
;
m_varID
=
-
1
;
m_nvals
=
0
;
m_fileID
=
0
;
}
int
...
...
src/cdo_apply.cc
View file @
86fe2edb
...
...
@@ -132,7 +132,7 @@ scan(std::vector<std::string> p_argv)
}
std
::
vector
<
std
::
string
>
expandApply
(
std
::
vector
<
std
::
string
>
&
p_argv
)
expandApply
(
const
std
::
vector
<
std
::
string
>
&
p_argv
)
{
auto
result
=
scan
(
p_argv
);
if
(
errState
==
-
1
)
exit
(
EXIT_FAILURE
);
...
...
src/cdo_apply.h
View file @
86fe2edb
...
...
@@ -24,6 +24,6 @@
* operators with arguments: written as -apply,OPERNAME,arguments
*/
std
::
vector
<
std
::
string
>
expandApply
(
std
::
vector
<
std
::
string
>
&
p_argv
);
std
::
vector
<
std
::
string
>
expandApply
(
const
std
::
vector
<
std
::
string
>
&
p_argv
);
#endif
src/datetime.cc
View file @
86fe2edb
...
...
@@ -401,8 +401,6 @@ getTimeIncrement(double jdelta, int64_t vdate0, int64_t vdate1)
void
checkTimeIncrement
(
int
tsID
,
int
calendar
,
int64_t
vdate
,
int
vtime
,
CheckTimeInc
&
checkTimeInc
)
{
const
char
*
tunits
[]
=
{
"second"
,
"minute"
,
"hour"
,
"day"
,
"month"
,
"year"
};
const
auto
juldate
=
julianDateEncode
(
calendar
,
vdate
,
vtime
);
if
(
tsID
)
...
...
@@ -415,6 +413,7 @@ checkTimeIncrement(int tsID, int calendar, int64_t vdate, int vtime, CheckTimeIn
if
(
checkTimeInc
.
lwarn
&&
(
timeIncr
.
period
!=
checkTimeInc
.
timeIncr
.
period
||
timeIncr
.
unit
!=
checkTimeInc
.
timeIncr
.
unit
))
{
checkTimeInc
.
lwarn
=
false
;
const
char
*
tunits
[]
=
{
"second"
,
"minute"
,
"hour"
,
"day"
,
"month"
,
"year"
};
cdoWarning
(
"Time increment in step %d (%lld%s) differs from step 1 (%lld%s)!"
" Set parameter equal=false for unequal time increments!"
,
tsID
+
1
,
timeIncr
.
period
,
tunits
[(
int
)
timeIncr
.
unit
],
checkTimeInc
.
timeIncr
.
period
,
...
...
src/datetime.h
View file @
86fe2edb
...
...
@@ -109,7 +109,7 @@ private:
int
has_bounds
=
-
1
;
int
calendar
=
-
1
;
TimeStat
stat
=
TimeStat
::
LAST
;
DateTimeInfo
timestat
;
DateTimeInfo
timestat
=
{}
;
std
::
vector
<
DateTimeInfo
>
dtinfo
;
void
mean
(
int
nsteps
);
...
...
src/grid_point_search.h
View file @
86fe2edb
...
...
@@ -73,7 +73,7 @@ class GridPointSearch
double
(
*
coordinates_xyz
)[
3
];
GridPointSearch
()
:
in_use
(
false
),
extrapolate
(
false
),
is_cyclic
(
false
),
is_reg2d
(
false
),
is_curve
(
false
),
n
(
0
),
search_container
(
nullptr
),
plons
(
nullptr
),
plats
(
nullptr
),
pointcloud
(
nullptr
)
{}
method
(
PointSearchMethod
::
full
),
n
(
0
),
search_container
(
nullptr
),
plons
(
nullptr
),
plats
(
nullptr
),
pointcloud
(
nullptr
)
{}
};
void
gridSearchPoint
(
GridPointSearch
&
gps
,
double
plon
,
double
plat
,
knnWeightsType
&
knnWeights
);
...
...
src/pipe.cc
View file @
86fe2edb
...
...
@@ -51,6 +51,10 @@ pipe_t::pipe_init()
tsIDr
=
-
1
;
tsIDw
=
-
1
;
varID
=
-
1
;
levelID
=
-
1
;
nrecs
=
0
;
nmiss
=
0
;
data_d
=
nullptr
;
data_f
=
nullptr
;
...
...
@@ -130,7 +134,7 @@ constexpr std::chrono::milliseconds TIMEOUT = std::chrono::milliseconds(1000);
int
processNumsActive
(
void
);
int
pipe_t
::
pipeInqVlist
(
int
&
p_vlistID
)
pipe_t
::
pipeInqVlist
(
int
p_vlistID
)
{
Debug
(
PIPE
,
"Inquiring vlist for vlistID: %d"
,
p_vlistID
);
std
::
chrono
::
milliseconds
time_to_wait
(
0
);
...
...
src/pipe.h
View file @
86fe2edb
...
...
@@ -39,7 +39,7 @@ struct pipe_t
{
public:
pipe_t
();
int
pipeInqVlist
(
int
&
vlistID
);
int
pipeInqVlist
(
int
vlistID
);
void
pipe_init
();
void
pipeDefRecord
(
int
p_varId
,
int
p_levelID
);
void
pipeDefTimestep
(
int
p_vlistID
,
int
tsID
);
...
...
src/specspace.h
View file @
86fe2edb
...
...
@@ -34,7 +34,7 @@ public:
long
nlat
=
0
;
long
ntr
=
0
;
long
nlev
=
0
;
long
ifax
[
10
];
long
ifax
[
10
]
=
{}
;
std
::
vector
<
double
>
vtrig
;
FC_Transformation
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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