mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Fix unintialized variables spotted by coverity
The InsetWrap case happens in decodeInsetParaps (InsetCommand.cpp), where the default constructor is invoked. In this case, lines was not initialized.
This commit is contained in:
parent
6b0cd451fb
commit
e263fe8e03
@ -47,10 +47,6 @@ InsetWrap::InsetWrap(Buffer * buf, string const & type)
|
||||
: InsetCaptionable(buf)
|
||||
{
|
||||
setCaptionType(type);
|
||||
params_.lines = 0;
|
||||
params_.placement = "o";
|
||||
params_.overhang = Length(0, Length::PCW);
|
||||
params_.width = Length(50, Length::PCW);
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,13 +30,13 @@ public:
|
||||
///
|
||||
std::string type;
|
||||
///
|
||||
int lines;
|
||||
int lines = 0;
|
||||
///
|
||||
std::string placement;
|
||||
std::string placement = "o";
|
||||
///
|
||||
Length overhang;
|
||||
Length overhang = Length(0, Length::PCW);
|
||||
///
|
||||
Length width;
|
||||
Length width = Length(50, Length::PCW);
|
||||
};
|
||||
|
||||
|
||||
|
@ -1369,7 +1369,7 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
|
||||
// otherwise parse it as an user macro
|
||||
MathData count;
|
||||
parse(count, FLAG_ITEM, mode);
|
||||
int cols;
|
||||
int cols = 0;
|
||||
// limit arbitrarily to 100 columns
|
||||
if (extractNumber(count, cols) && cols > 0 && cols < 100) {
|
||||
// resize the table if necessary
|
||||
|
Loading…
Reference in New Issue
Block a user