[prev in list] [next in list] [prev in thread] [next in thread]
List: lyx-devel
Subject: Re: New Defects reported by Coverity Scan for LyX
From: Jean-Marc Lasgouttes <lasgouttes () lyx ! org>
Date: 2019-02-18 14:21:23
Message-ID: 6f93a599-57f6-566b-088a-cd33d5eea3b1 () lyx ! org
[Download RAW message or body]
Le 18/02/2019 à 15:04, scan-admin@coverity.com a écrit :
> Hi,
>
> Please find the latest report on new defect(s) introduced to LyX found with \
> Coverity Scan.
> 30 new defect(s) introduced to LyX found with Coverity Scan.
> 3 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent \
> build analyzed by Coverity Scan.
> New defect(s) Reported-by: Coverity Scan
> Showing 20 of 30 defect(s)
So, coverity is back to work for some reason. I ran it on my desktop
machine which uses ubuntu 16.04 and Qt5.5. This is why there are moc
errors, but I am going to mute them.
Last time I checked, coverity would fail to build on ubuntu 18.10.
Two real bugs at least are spotted and have been fixed.
JMarc
> ** CID 332452: Uninitialized members (UNINIT_CTOR)
> /src/insets/InsetLayout.cpp: 50 in lyx::InsetLayout::InsetLayout()()
>
>
> ________________________________________________________________________________________________________
>
> *** CID 332452: Uninitialized members (UNINIT_CTOR)
> /src/insets/InsetLayout.cpp: 50 in lyx::InsetLayout::InsetLayout()()
> 44 freespacing_(false), keepempty_(false), forceltr_(false),
> 45 forceownlines_(false), needprotect_(false), needcprotect_(false),
> 46 intoc_(false), spellcheck_(true), resetsfont_(false), display_(true),
> 47 forcelocalfontswitch_(false), add_to_toc_(false), is_toc_caption_(false)
> 48 {
> 49 labelfont_.setColor(Color_error);
> > > > CID 332452: Uninitialized members (UNINIT_CTOR)
> > > > Non-static class member "edit_external_" is not initialized in this \
> > > > constructor nor in any functions that it calls.
> 50 }
> 51
> 52
> 53 InsetLayout::InsetDecoration translateDecoration(std::string const & str)
> 54 {
> 55 if (compare_ascii_no_case(str, "classic") == 0)
>
> ** CID 332451: Incorrect expression (CONSTANT_EXPRESSION_RESULT)
> /usr/include/boost/function/function_template.hpp: 945 in \
> boost::function0<void>::assign_to<lyx::graphics::PreviewImage::Impl::Impl(lyx::graphics::PreviewImage&, \
> lyx::graphics::PreviewLoader &, const std::__cxx11::basic_string<char, \
> std::char_traits<char>, std::allocator<char>> &, const lyx::support::FileName &, \
> double)::[lambda() (instance 1)]>(T1)()
>
> ________________________________________________________________________________________________________
>
> *** CID 332451: Incorrect expression (CONSTANT_EXPRESSION_RESULT)
> /usr/include/boost/function/function_template.hpp: 945 in \
> boost::function0<void>::assign_to<lyx::graphics::PreviewImage::Impl::Impl(lyx::graphics::PreviewImage&, \
> lyx::graphics::PreviewLoader &, const std::__cxx11::basic_string<char, \
> std::char_traits<char>, std::allocator<char>> &, const lyx::support::FileName &, \
> double)::[lambda() (instance 1)]>(T1)() 939 static const vtable_type \
> stored_vtable = 940 { { &manager_type::manage }, &invoker_type::invoke \
> }; 941
> 942 if (stored_vtable.assign_to(f, functor)) {
> 943 std::size_t value = \
> reinterpret_cast<std::size_t>(&stored_vtable.base); 944 // \
> coverity[pointless_expression]: suppress coverity warnings on apparant if(const).
> > > > CID 332451: Incorrect expression (CONSTANT_EXPRESSION_RESULT)
> > > > The expression "true /* mpl_::bool_<true>::value */ && true /* \
> > > > mpl_::bool_<true>::value */" does not accomplish anything because it \
> > > > evaluates to either of its identical operands, "mpl_::bool_<true>::value".
> 945 if (boost::has_trivial_copy_constructor<Functor>::value &&
> 946 boost::has_trivial_destructor<Functor>::value &&
> 947 \
> boost::detail::function::function_allows_small_object_optimization<Functor>::value) \
> 948 value |= static_cast<std::size_t>(0x01); 949 vtable = \
> reinterpret_cast<boost::detail::function::vtable_base *>(value); 950 } \
> else
> ** CID 332450: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiPrefs.cpp: 310 in \
> lyx::frontend::PrefOutput::qt_metacall(QMetaObject::Call, int, void **)()
>
> ________________________________________________________________________________________________________
>
> *** CID 332450: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiPrefs.cpp: 310 in \
> lyx::frontend::PrefOutput::qt_metacall(QMetaObject::Call, int, void **)() 304 \
> return PrefModule::qt_metacast(_clname); 305 }
> 306
> 307 int lyx::frontend::PrefOutput::qt_metacall(QMetaObject::Call _c, int _id, \
> void **_a) 308 {
> 309 _id = PrefModule::qt_metacall(_c, _id, _a);
> > > > CID 332450: Incorrect expression (IDENTICAL_BRANCHES)
> > > > The same code is executed when the condition "_id < 0" is true or false, \
> > > > because the code in the if-then branch and after the if statement is \
> > > > identical. Should the if statement be removed?
> 310 if (_id < 0)
> 311 return _id;
> 312 return _id;
> 313 }
> 314 struct qt_meta_stringdata_lyx__frontend__PrefInput_t {
> 315 QByteArrayData data[6];
>
> ** CID 332449: Incorrect expression (COPY_PASTE_ERROR)
> /src/Font.cpp: 177 in _ZN3lyx9stateTextB5cxx11ERKNS_8FontInfoEb()
>
>
> ________________________________________________________________________________________________________
>
> *** CID 332449: Incorrect expression (COPY_PASTE_ERROR)
> /src/Font.cpp: 177 in _ZN3lyx9stateTextB5cxx11ERKNS_8FontInfoEb()
> 171 if (f.uwave() != FONT_INHERIT && (!terse || f.uwave() == FONT_ON))
> 172 os << bformat(_("Wavy underline %1$s, "),
> 173 _(GUIMiscNames[f.uwave()]));
> 174 if (f.strikeout() != FONT_INHERIT && (!terse || f.strikeout() == FONT_ON))
> 175 os << bformat(_("Strike out %1$s, "),
> 176 _(GUIMiscNames[f.strikeout()]));
> > > > CID 332449: Incorrect expression (COPY_PASTE_ERROR)
> > > > "strikeout" in "f->strikeout()" looks like a copy-paste error.
> 177 if (f.xout() != FONT_INHERIT && (!terse || f.strikeout() == FONT_ON))
> 178 os << bformat(_("Cross out %1$s, "),
> 179 _(GUIMiscNames[f.xout()]));
> 180 if (f.noun() != FONT_INHERIT && (!terse || f.noun() != FONT_IGNORE))
> 181 os << bformat(_("Noun %1$s, "),
> 182 _(GUIMiscNames[f.noun()]));
>
> ** CID 142303: (CONSTANT_EXPRESSION_RESULT)
> /usr/include/boost/function/function_template.hpp: 945 in \
> boost::function0<void>::assign_to<lyx::InsetInclude::InsetInclude(lyx::Buffer *, \
> const lyx::InsetCommandParams &)::[lambda() (instance 1)]>(T1)()
> /usr/include/boost/function/function_template.hpp: 945 in \
> boost::function0<void>::assign_to<lyx::support::<unnamed>::Murder::Murder(int, \
> int)::[lambda() (instance 1)]>(T1)()
>
> ________________________________________________________________________________________________________
>
> *** CID 142303: (CONSTANT_EXPRESSION_RESULT)
> /usr/include/boost/function/function_template.hpp: 945 in \
> boost::function0<void>::assign_to<lyx::InsetInclude::InsetInclude(lyx::Buffer *, \
> const lyx::InsetCommandParams &)::[lambda() (instance 1)]>(T1)() 939 \
> static const vtable_type stored_vtable = 940 { { &manager_type::manage \
> }, &invoker_type::invoke }; 941
> 942 if (stored_vtable.assign_to(f, functor)) {
> 943 std::size_t value = \
> reinterpret_cast<std::size_t>(&stored_vtable.base); 944 // \
> coverity[pointless_expression]: suppress coverity warnings on apparant if(const).
> > > > CID 142303: (CONSTANT_EXPRESSION_RESULT)
> > > > The expression "true /* mpl_::bool_<true>::value */ && true /* \
> > > > mpl_::bool_<true>::value */" does not accomplish anything because it \
> > > > evaluates to either of its identical operands, "mpl_::bool_<true>::value".
> 945 if (boost::has_trivial_copy_constructor<Functor>::value &&
> 946 boost::has_trivial_destructor<Functor>::value &&
> 947 \
> boost::detail::function::function_allows_small_object_optimization<Functor>::value) \
> 948 value |= static_cast<std::size_t>(0x01); 949 vtable = \
> reinterpret_cast<boost::detail::function::vtable_base *>(value); 950 } \
> else
> /usr/include/boost/function/function_template.hpp: 945 in \
> boost::function0<void>::assign_to<lyx::support::<unnamed>::Murder::Murder(int, \
> int)::[lambda() (instance 1)]>(T1)() 939 static const vtable_type \
> stored_vtable = 940 { { &manager_type::manage }, &invoker_type::invoke \
> }; 941
> 942 if (stored_vtable.assign_to(f, functor)) {
> 943 std::size_t value = \
> reinterpret_cast<std::size_t>(&stored_vtable.base); 944 // \
> coverity[pointless_expression]: suppress coverity warnings on apparant if(const).
> > > > CID 142303: (CONSTANT_EXPRESSION_RESULT)
> > > > The expression "true /* mpl_::bool_<true>::value */ && true /* \
> > > > mpl_::bool_<true>::value */" does not accomplish anything because it \
> > > > evaluates to either of its identical operands, "mpl_::bool_<true>::value".
> 945 if (boost::has_trivial_copy_constructor<Functor>::value &&
> 946 boost::has_trivial_destructor<Functor>::value &&
> 947 \
> boost::detail::function::function_allows_small_object_optimization<Functor>::value) \
> 948 value |= static_cast<std::size_t>(0x01); 949 vtable = \
> reinterpret_cast<boost::detail::function::vtable_base *>(value); 950 } \
> else
> ** CID 134136: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_ToolTipFormatter.cpp: 85 in \
> lyx::frontend::ToolTipFormatter::qt_metacall(QMetaObject::Call, int, void **)()
>
> ________________________________________________________________________________________________________
>
> *** CID 134136: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_ToolTipFormatter.cpp: 85 in \
> lyx::frontend::ToolTipFormatter::qt_metacall(QMetaObject::Call, int, void **)() 79 \
> return QObject::qt_metacast(_clname); 80 }
> 81
> 82 int lyx::frontend::ToolTipFormatter::qt_metacall(QMetaObject::Call _c, int \
> _id, void **_a) 83 {
> 84 _id = QObject::qt_metacall(_c, _id, _a);
> > > > CID 134136: Incorrect expression (IDENTICAL_BRANCHES)
> > > > The same code is executed when the condition "_id < 0" is true or false, \
> > > > because the code in the if-then branch and after the if statement is \
> > > > identical. Should the if statement be removed?
> 85 if (_id < 0)
> 86 return _id;
> 87 return _id;
> 88 }
>
> ** CID 133749: (UNINIT)
>
>
> ________________________________________________________________________________________________________
>
> *** CID 133749: (UNINIT)
> /usr/include/c++/5/bits/regex.tcc: 480 in \
> std::regex_replace<std::back_insert_iterator<std::__cxx11::basic_string<char, \
> std::char_traits<char>, std::allocator<char>>>, __gnu_cxx::__normal_iterator<const \
> char *, std::__cxx11::basic_string<char, std::char_traits<char>, \
> std::allocator<char>>>, std::__cxx11::regex_traits<char>, char>(T1, T2, T2, const \
> std::__cxx11::basic_regex<T4, T3> &, const T4 *, \
> std::regex_constants::match_flag_type)() 474 const _Ch_type* __fmt,
> 475 regex_constants::match_flag_type __flags)
> 476 {
> 477 typedef regex_iterator<_Bi_iter, _Ch_type, _Rx_traits> _IterT;
> 478 _IterT __i(__first, __last, __e, __flags);
> 479 _IterT __end;
> > > > CID 133749: (UNINIT)
> > > > Using uninitialized value "__end._M_pregex" when calling "operator ==".
> 480 if (__i == __end)
> 481 {
> 482 if (!(__flags & regex_constants::format_no_copy))
> 483 __out = std::copy(__first, __last, __out);
> 484 }
> 485 else
> /usr/include/c++/5/bits/regex.tcc: 480 in \
> std::regex_replace<std::back_insert_iterator<std::__cxx11::basic_string<char, \
> std::char_traits<char>, std::allocator<char>>>, __gnu_cxx::__normal_iterator<const \
> char *, std::__cxx11::basic_string<char, std::char_traits<char>, \
> std::allocator<char>>>, std::__cxx11::regex_traits<char>, char>(T1, T2, T2, const \
> std::__cxx11::basic_regex<T4, T3> &, const T4 *, \
> std::regex_constants::match_flag_type)() 474 const _Ch_type* __fmt,
> 475 regex_constants::match_flag_type __flags)
> 476 {
> 477 typedef regex_iterator<_Bi_iter, _Ch_type, _Rx_traits> _IterT;
> 478 _IterT __i(__first, __last, __e, __flags);
> 479 _IterT __end;
> > > > CID 133749: (UNINIT)
> > > > Using uninitialized value "__end._M_flags" when calling "operator ==".
> 480 if (__i == __end)
> 481 {
> 482 if (!(__flags & regex_constants::format_no_copy))
> 483 __out = std::copy(__first, __last, __out);
> 484 }
> 485 else
> /usr/include/c++/5/bits/regex.tcc: 480 in \
> std::regex_replace<std::ostream_iterator<char, char, std::char_traits<char>>, \
> __gnu_cxx::__normal_iterator<const char *, std::__cxx11::basic_string<char, \
> std::char_traits<char>, std::allocator<char>>>, std::__cxx11::regex_traits<char>, \
> char>(T1, T2, T2, const std::__cxx11::basic_regex<T4, T3> &, const T4 *, \
> std::regex_constants::match_flag_type)() 474 const _Ch_type* __fmt,
> 475 regex_constants::match_flag_type __flags)
> 476 {
> 477 typedef regex_iterator<_Bi_iter, _Ch_type, _Rx_traits> _IterT;
> 478 _IterT __i(__first, __last, __e, __flags);
> 479 _IterT __end;
> > > > CID 133749: (UNINIT)
> > > > Using uninitialized value "__end._M_pregex" when calling "operator ==".
> 480 if (__i == __end)
> 481 {
> 482 if (!(__flags & regex_constants::format_no_copy))
> 483 __out = std::copy(__first, __last, __out);
> 484 }
> 485 else
> /usr/include/c++/5/bits/regex.tcc: 480 in \
> std::regex_replace<std::ostream_iterator<char, char, std::char_traits<char>>, \
> __gnu_cxx::__normal_iterator<const char *, std::__cxx11::basic_string<char, \
> std::char_traits<char>, std::allocator<char>>>, std::__cxx11::regex_traits<char>, \
> char>(T1, T2, T2, const std::__cxx11::basic_regex<T4, T3> &, const T4 *, \
> std::regex_constants::match_flag_type)() 474 const _Ch_type* __fmt,
> 475 regex_constants::match_flag_type __flags)
> 476 {
> 477 typedef regex_iterator<_Bi_iter, _Ch_type, _Rx_traits> _IterT;
> 478 _IterT __i(__first, __last, __e, __flags);
> 479 _IterT __end;
> > > > CID 133749: (UNINIT)
> > > > Using uninitialized value "__end._M_flags" when calling "operator ==".
> 480 if (__i == __end)
> 481 {
> 482 if (!(__flags & regex_constants::format_no_copy))
> 483 __out = std::copy(__first, __last, __out);
> 484 }
> 485 else
>
> ** CID 127190: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiDocument.cpp: 709 in \
> lyx::frontend::FontModule::qt_metacall(QMetaObject::Call, int, void **)()
>
> ________________________________________________________________________________________________________
>
> *** CID 127190: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiDocument.cpp: 709 in \
> lyx::frontend::FontModule::qt_metacall(QMetaObject::Call, int, void **)() 703 \
> return UiWidget<Ui::FontUi>::qt_metacast(_clname); 704 }
> 705
> 706 int lyx::frontend::FontModule::qt_metacall(QMetaObject::Call _c, int _id, \
> void **_a) 707 {
> 708 _id = UiWidget<Ui::FontUi>::qt_metacall(_c, _id, _a);
> > > > CID 127190: Incorrect expression (IDENTICAL_BRANCHES)
> > > > The same code is executed when the condition "_id < 0" is true or false, \
> > > > because the code in the if-then branch and after the if statement is \
> > > > identical. Should the if statement be removed?
> 709 if (_id < 0)
> 710 return _id;
> 711 return _id;
> 712 }
>
> ** CID 127189: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_TocModel.cpp: 85 in \
> lyx::frontend::TocModels::qt_metacall(QMetaObject::Call, int, void **)()
>
> ________________________________________________________________________________________________________
>
> *** CID 127189: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_TocModel.cpp: 85 in \
> lyx::frontend::TocModels::qt_metacall(QMetaObject::Call, int, void **)() 79 \
> return QObject::qt_metacast(_clname); 80 }
> 81
> 82 int lyx::frontend::TocModels::qt_metacall(QMetaObject::Call _c, int _id, \
> void **_a) 83 {
> 84 _id = QObject::qt_metacall(_c, _id, _a);
> > > > CID 127189: Incorrect expression (IDENTICAL_BRANCHES)
> > > > The same code is executed when the condition "_id < 0" is true or false, \
> > > > because the code in the if-then branch and after the if statement is \
> > > > identical. Should the if statement be removed?
> 85 if (_id < 0)
> 86 return _id;
> 87 return _id;
> 88 }
>
> ** CID 23332: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_Validator.cpp: 221 in \
> lyx::frontend::DoubleAutoValidator::qt_metacall(QMetaObject::Call, int, void **)()
>
> ________________________________________________________________________________________________________
>
> *** CID 23332: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_Validator.cpp: 221 in \
> lyx::frontend::DoubleAutoValidator::qt_metacall(QMetaObject::Call, int, void **)() \
> 215 return QDoubleValidator::qt_metacast(_clname); 216 }
> 217
> 218 int lyx::frontend::DoubleAutoValidator::qt_metacall(QMetaObject::Call _c, \
> int _id, void **_a) 219 {
> 220 _id = QDoubleValidator::qt_metacall(_c, _id, _a);
> > > > CID 23332: Incorrect expression (IDENTICAL_BRANCHES)
> > > > The same code is executed when the condition "_id < 0" is true or false, \
> > > > because the code in the if-then branch and after the if statement is \
> > > > identical. Should the if statement be removed?
> 221 if (_id < 0)
> 222 return _id;
> 223 return _id;
> 224 }
> 225 struct qt_meta_stringdata_lyx__frontend__NoNewLineValidator_t {
> 226 QByteArrayData data[1];
>
> ** CID 23331: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiToc.cpp: 85 in \
> lyx::frontend::GuiToc::qt_metacall(QMetaObject::Call, int, void **)()
>
> ________________________________________________________________________________________________________
>
> *** CID 23331: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiToc.cpp: 85 in \
> lyx::frontend::GuiToc::qt_metacall(QMetaObject::Call, int, void **)() 79 \
> return DockView::qt_metacast(_clname); 80 }
> 81
> 82 int lyx::frontend::GuiToc::qt_metacall(QMetaObject::Call _c, int _id, void \
> **_a) 83 {
> 84 _id = DockView::qt_metacall(_c, _id, _a);
> > > > CID 23331: Incorrect expression (IDENTICAL_BRANCHES)
> > > > The same code is executed when the condition "_id < 0" is true or false, \
> > > > because the code in the if-then branch and after the if statement is \
> > > > identical. Should the if statement be removed?
> 85 if (_id < 0)
> 86 return _id;
> 87 return _id;
> 88 }
>
> ** CID 23330: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiLine.cpp: 87 in \
> lyx::frontend::GuiLine::qt_metacall(QMetaObject::Call, int, void **)()
>
> ________________________________________________________________________________________________________
>
> *** CID 23330: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiLine.cpp: 87 in \
> lyx::frontend::GuiLine::qt_metacall(QMetaObject::Call, int, void **)() 81 \
> return InsetParamsWidget::qt_metacast(_clname); 82 }
> 83
> 84 int lyx::frontend::GuiLine::qt_metacall(QMetaObject::Call _c, int _id, void \
> **_a) 85 {
> 86 _id = InsetParamsWidget::qt_metacall(_c, _id, _a);
> > > > CID 23330: Incorrect expression (IDENTICAL_BRANCHES)
> > > > The same code is executed when the condition "_id < 0" is true or false, \
> > > > because the code in the if-then branch and after the if statement is \
> > > > identical. Should the if statement be removed?
> 87 if (_id < 0)
> 88 return _id;
> 89 return _id;
> 90 }
>
> ** CID 23329: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_Validator.cpp: 153 in \
> lyx::frontend::LengthAutoValidator::qt_metacall(QMetaObject::Call, int, void **)()
>
> ________________________________________________________________________________________________________
>
> *** CID 23329: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_Validator.cpp: 153 in \
> lyx::frontend::LengthAutoValidator::qt_metacall(QMetaObject::Call, int, void **)() \
> 147 return LengthValidator::qt_metacast(_clname); 148 }
> 149
> 150 int lyx::frontend::LengthAutoValidator::qt_metacall(QMetaObject::Call _c, \
> int _id, void **_a) 151 {
> 152 _id = LengthValidator::qt_metacall(_c, _id, _a);
> > > > CID 23329: Incorrect expression (IDENTICAL_BRANCHES)
> > > > The same code is executed when the condition "_id < 0" is true or false, \
> > > > because the code in the if-then branch and after the if statement is \
> > > > identical. Should the if statement be removed?
> 153 if (_id < 0)
> 154 return _id;
> 155 return _id;
> 156 }
> 157 struct qt_meta_stringdata_lyx__frontend__DoubleAutoValidator_t {
> 158 QByteArrayData data[1];
>
> ** CID 23326: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiERT.cpp: 87 in \
> lyx::frontend::GuiERT::qt_metacall(QMetaObject::Call, int, void **)()
>
> ________________________________________________________________________________________________________
>
> *** CID 23326: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiERT.cpp: 87 in \
> lyx::frontend::GuiERT::qt_metacall(QMetaObject::Call, int, void **)() 81 \
> return InsetParamsWidget::qt_metacast(_clname); 82 }
> 83
> 84 int lyx::frontend::GuiERT::qt_metacall(QMetaObject::Call _c, int _id, void \
> **_a) 85 {
> 86 _id = InsetParamsWidget::qt_metacall(_c, _id, _a);
> > > > CID 23326: Incorrect expression (IDENTICAL_BRANCHES)
> > > > The same code is executed when the condition "_id < 0" is true or false, \
> > > > because the code in the if-then branch and after the if statement is \
> > > > identical. Should the if statement be removed?
> 87 if (_id < 0)
> 88 return _id;
> 89 return _id;
> 90 }
>
> ** CID 23325: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_Validator.cpp: 85 in \
> lyx::frontend::LengthValidator::qt_metacall(QMetaObject::Call, int, void **)()
>
> ________________________________________________________________________________________________________
>
> *** CID 23325: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_Validator.cpp: 85 in \
> lyx::frontend::LengthValidator::qt_metacall(QMetaObject::Call, int, void **)() 79 \
> return QValidator::qt_metacast(_clname); 80 }
> 81
> 82 int lyx::frontend::LengthValidator::qt_metacall(QMetaObject::Call _c, int \
> _id, void **_a) 83 {
> 84 _id = QValidator::qt_metacall(_c, _id, _a);
> > > > CID 23325: Incorrect expression (IDENTICAL_BRANCHES)
> > > > The same code is executed when the condition "_id < 0" is true or false, \
> > > > because the code in the if-then branch and after the if statement is \
> > > > identical. Should the if statement be removed?
> 85 if (_id < 0)
> 86 return _id;
> 87 return _id;
> 88 }
> 89 struct qt_meta_stringdata_lyx__frontend__LengthAutoValidator_t {
> 90 QByteArrayData data[1];
>
> ** CID 23324: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiNomenclature.cpp: 87 in \
> lyx::frontend::GuiNomenclature::qt_metacall(QMetaObject::Call, int, void **)()
>
> ________________________________________________________________________________________________________
>
> *** CID 23324: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiNomenclature.cpp: 87 in \
> lyx::frontend::GuiNomenclature::qt_metacall(QMetaObject::Call, int, void **)() 81 \
> return InsetParamsWidget::qt_metacast(_clname); 82 }
> 83
> 84 int lyx::frontend::GuiNomenclature::qt_metacall(QMetaObject::Call _c, int \
> _id, void **_a) 85 {
> 86 _id = InsetParamsWidget::qt_metacall(_c, _id, _a);
> > > > CID 23324: Incorrect expression (IDENTICAL_BRANCHES)
> > > > The same code is executed when the condition "_id < 0" is true or false, \
> > > > because the code in the if-then branch and after the if statement is \
> > > > identical. Should the if statement be removed?
> 87 if (_id < 0)
> 88 return _id;
> 89 return _id;
> 90 }
>
> ** CID 23323: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiPrefs.cpp: 2036 in \
> lyx::frontend::PrefIdentity::qt_metacall(QMetaObject::Call, int, void **)()
>
> ________________________________________________________________________________________________________
>
> *** CID 23323: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiPrefs.cpp: 2036 in \
> lyx::frontend::PrefIdentity::qt_metacall(QMetaObject::Call, int, void **)() 2030 \
> return PrefModule::qt_metacast(_clname); 2031 }
> 2032
> 2033 int lyx::frontend::PrefIdentity::qt_metacall(QMetaObject::Call _c, int \
> _id, void **_a) 2034 {
> 2035 _id = PrefModule::qt_metacall(_c, _id, _a);
> > > > CID 23323: Incorrect expression (IDENTICAL_BRANCHES)
> > > > The same code is executed when the condition "_id < 0" is true or false, \
> > > > because the code in the if-then branch and after the if statement is \
> > > > identical. Should the if statement be removed?
> 2036 if (_id < 0)
> 2037 return _id;
> 2038 return _id;
> 2039 }
>
> ** CID 23322: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiLabel.cpp: 87 in \
> lyx::frontend::GuiLabel::qt_metacall(QMetaObject::Call, int, void **)()
>
> ________________________________________________________________________________________________________
>
> *** CID 23322: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiLabel.cpp: 87 in \
> lyx::frontend::GuiLabel::qt_metacall(QMetaObject::Call, int, void **)() 81 \
> return InsetParamsWidget::qt_metacast(_clname); 82 }
> 83
> 84 int lyx::frontend::GuiLabel::qt_metacall(QMetaObject::Call _c, int _id, void \
> **_a) 85 {
> 86 _id = InsetParamsWidget::qt_metacall(_c, _id, _a);
> > > > CID 23322: Incorrect expression (IDENTICAL_BRANCHES)
> > > > The same code is executed when the condition "_id < 0" is true or false, \
> > > > because the code in the if-then branch and after the if statement is \
> > > > identical. Should the if statement be removed?
> 87 if (_id < 0)
> 88 return _id;
> 89 return _id;
> 90 }
>
> ** CID 23321: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiClipboard.cpp: 85 in \
> lyx::frontend::CacheMimeData::qt_metacall(QMetaObject::Call, int, void **)()
>
> ________________________________________________________________________________________________________
>
> *** CID 23321: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiClipboard.cpp: 85 in \
> lyx::frontend::CacheMimeData::qt_metacall(QMetaObject::Call, int, void **)() 79 \
> return QMimeData::qt_metacast(_clname); 80 }
> 81
> 82 int lyx::frontend::CacheMimeData::qt_metacall(QMetaObject::Call _c, int _id, \
> void **_a) 83 {
> 84 _id = QMimeData::qt_metacall(_c, _id, _a);
> > > > CID 23321: Incorrect expression (IDENTICAL_BRANCHES)
> > > > The same code is executed when the condition "_id < 0" is true or false, \
> > > > because the code in the if-then branch and after the if statement is \
> > > > identical. Should the if statement be removed?
> 85 if (_id < 0)
> 86 return _id;
> 87 return _id;
> 88 }
> 89 struct qt_meta_stringdata_lyx__frontend__GuiClipboard_t {
> 90 QByteArrayData data[4];
>
> ** CID 23320: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiPrefs.cpp: 1828 in \
> lyx::frontend::PrefEdit::qt_metacall(QMetaObject::Call, int, void **)()
>
> ________________________________________________________________________________________________________
>
> *** CID 23320: Incorrect expression (IDENTICAL_BRANCHES)
> /src/frontends/qt4/moc_GuiPrefs.cpp: 1828 in \
> lyx::frontend::PrefEdit::qt_metacall(QMetaObject::Call, int, void **)() 1822 \
> return PrefModule::qt_metacast(_clname); 1823 }
> 1824
> 1825 int lyx::frontend::PrefEdit::qt_metacall(QMetaObject::Call _c, int _id, \
> void **_a) 1826 {
> 1827 _id = PrefModule::qt_metacall(_c, _id, _a);
> > > > CID 23320: Incorrect expression (IDENTICAL_BRANCHES)
> > > > The same code is executed when the condition "_id < 0" is true or false, \
> > > > because the code in the if-then branch and after the if statement is \
> > > > identical. Should the if statement be removed?
> 1828 if (_id < 0)
> 1829 return _id;
> 1830 return _id;
> 1831 }
> 1832 struct qt_meta_stringdata_lyx__frontend__PrefShortcuts_t {
> 1833 QByteArrayData data[13];
>
>
> ________________________________________________________________________________________________________
> To view the defects in Coverity Scan visit, \
> https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWc \
> h-2Bd2MGckcRYADu2lXp-2FMPbCudg6BDTp-2BMtFyh50OjtqMFhpTPmF7HQ-3D-3D_FocuuqQsn-2FnlHMn \
> VngCR8l20EiTVA3caADQAvE03ez8gQjg7rcF9ISR0C4C6OTMry9RxHUNLAFDzuE98q2-2BEJVle5Ul1m0Mfp \
> zJPksY-2B9onMzO4zwROLMKDVUiyAelqNgA2o6G18hK-2BKtQeh4Z1oE-2BM2dt2P1SH06xCp58B-2F-2FOQMgcnPU4Qih1ctGCQOeXHucH7p9k92zWmHiP3hFKRNBQ-3D-3D
>
> To manage Coverity Scan email notifications for "lasgouttes@lyx.org", click \
> https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWc \
> h-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4zTHc7nwJZRA7xlxvk-2BHHUjYobniXPUx6JtikOAvgrJOKMB \
> 21XuO3WOMg3ALkUD3viwARC-2BQUxsd4CpiVuVeaaCzATWk06pn7unQQf2F1jn4-3D_FocuuqQsn-2FnlHMn \
> VngCR8l20EiTVA3caADQAvE03ez8gQjg7rcF9ISR0C4C6OTMrd-2FfLwUyaijTt5sKetcv2pMW4TDuJ6rp-2 \
> FTjYCpMWQkU15Dbxiz4geR86-2BvqYyYVM4dK6QS0V-2FXD9WQCuCa6o5zjwH9a5sFOCBb3Jtge4SOALFVqhIwdTcHG2tZcp5Mhgx6WudSia90O-2FgSJ6xyFN-2BWQ-3D-3D
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic