Hi,

I had to update coverity scan to the version 2023.06.2, and it has a new GLOBAL_INIT_ORDER error. In theory, it is a good idea, but as you will see below, it triggers for static docstring and pretends that these definitions require lyxrc or theCiteEnginesList.

This does not make any sense to me. Does it make sense to you?

Note that there are other reports that may be useful. But 300 new defects is a bit more than I expected :)

JMarc


-------- Message transféré --------
Sujet : New Defects reported by Coverity Scan for LyX
Date : Wed, 22 Nov 2023 16:26:32 +0000 (UTC)
De : scan-ad...@coverity.com
Pour : lasgout...@lyx.org

Hi,

Please find the latest report on new defect(s) introduced to LyX found with Coverity Scan.

300 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 300 defect(s)


** CID 409144:  High impact quality  (GLOBAL_INIT_ORDER)


________________________________________________________________________________________________________
*** CID 409144:  High impact quality  (GLOBAL_INIT_ORDER)
/home/lasgoutt/src/lyx/coverity/lyx/src/LaTeXFeatures.cpp: 474 in ()
468             "\\ProvideTextCommandDefault{\\textschwa}{\\cyrschwa}\n");
469     470     // split-level fractions
471     static docstring const xfrac_def = from_ascii(
472                "\\usepackage{xfrac}\n");
473     >>>     CID 409144:  High impact quality  (GLOBAL_INIT_ORDER)
    The constructor of global object "lyx::smallLetterFrac_def[abi:cxx11]" itself makes use of global object 
"lyx::lyxrc" defined in another compilation unit.  The order of construction is unspecified, so 
"lyx::smallLetterFrac_def[abi:cxx11]" might be created before "lyx::lyxrc" is available.
474     static docstring const smallLetterFrac_def = from_ascii(
475 "\\DeclareCollectionInstance{smallLetterFrac}{xfrac}{default}{text}\n"
476             "  {phantom=c, scale-factor=1.0, slash-left-kern=-.05em}\n"
477             
"\\DeclareCollectionInstance{smallLetterFrac}{xfrac}{lmr}{text}\n"
478 " {slash-symbol-font=ptm, phantom=c, scale-factor=1, slash-left-kern=-.05em}\n"
479             
"\\DeclareCollectionInstance{smallLetterFrac}{xfrac}{lmss}{text}\n"

** CID 409143:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/lasgoutt/src/lyx/coverity/lyx/src/frontends/qt/GuiApplication.cpp: 2050 in lyx::frontend::GuiApplication::dispatch(const lyx::FuncRequest &, lyx::DispatchResult &)()


________________________________________________________________________________________________________
*** CID 409143:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/lasgoutt/src/lyx/coverity/lyx/src/frontends/qt/GuiApplication.cpp: 2050 in lyx::frontend::GuiApplication::dispatch(const lyx::FuncRequest &, lyx::DispatchResult &)()
2044                    break;
2045     2046           case LFUN_REPEAT: {
2047                    // repeat command
2048                    string countstr;
2049                    string rest = split(argument, countstr, ' ');
    CID 409143:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
    "countstr" is passed-by-value as parameter to "convert" when it could be 
moved instead.
2050                    int const count = convert<int>(countstr);
2051                    // an arbitrary number to limit number of iterations
2052                    int const max_iter = 10000;
2053                    if (count > max_iter) {
2054 dr.setMessage(bformat(_("Cannot iterate more than %1$d times"), max_iter));
2055                            dr.setError(true);

** CID 409142:  High impact quality  (GLOBAL_INIT_ORDER)


________________________________________________________________________________________________________
*** CID 409142:  High impact quality  (GLOBAL_INIT_ORDER)
/home/lasgoutt/src/lyx/coverity/lyx/src/LaTeXFeatures.cpp: 345 in ()
339             "        }%\n"
340             "      \\leavevmode\\\\%\n"
341             "     }{}%\n"
342             "  \\fi%\n"
343             "}\n");
344     >>>     CID 409142:  High impact quality  (GLOBAL_INIT_ORDER)
    The constructor of global object "lyx::changetracking_none_def[abi:cxx11]" itself makes use of global 
object "lyx::theCiteEnginesList" defined in another compilation unit.  The order of construction is 
unspecified, so "lyx::changetracking_none_def[abi:cxx11]" might be created before 
"lyx::theCiteEnginesList" is available.
345     static docstring const changetracking_none_def = from_ascii(
346             "%% Change tracking: Disable markup in output\n"
347             "\\newcommand{\\lyxadded}[3]{#3}\n"
348             "\\newcommand{\\lyxdeleted}[3]{}\n"
349             "\\newcommand{\\lyxobjdeleted}[3]{}\n"
350             "\\newcommand{\\lyxdisplayobjdeleted}[3]{}\n"

** CID 409141:  High impact quality  (GLOBAL_INIT_ORDER)


________________________________________________________________________________________________________
*** CID 409141:  High impact quality  (GLOBAL_INIT_ORDER)
/home/lasgoutt/src/lyx/coverity/lyx/src/LaTeXFeatures.cpp: 363 in ()
357             "  
\\fontencoding{LGR}\\selectfont\\def\\encodingdefault{LGR}}\n"
358 "\\DeclareRobustCommand{\\textgreek}[1]{\\leavevmode{\\greektext #1}}\n");
359     360     static docstring const textcyr_T2A_def = from_ascii(
361             "\\InputIfFileExists{t2aenc.def}{}{%\n"
362 " \\errmessage{File `t2aenc.def' not found: Cyrillic script not supported}}\n");
    CID 409141:  High impact quality  (GLOBAL_INIT_ORDER)
    The constructor of global object "lyx::textcyr_def[abi:cxx11]" itself makes use of global object 
"lyx::lyxerr" defined in another compilation unit.  The order of construction is unspecified, so 
"lyx::textcyr_def[abi:cxx11]" might be created before "lyx::lyxerr" is available.
363     static docstring const textcyr_def = from_ascii(
364             "\\DeclareRobustCommand{\\cyrtext}{%\n"
365             "  
\\fontencoding{T2A}\\selectfont\\def\\encodingdefault{T2A}}\n"
366 "\\DeclareRobustCommand{\\textcyrillic}[1]{\\leavevmode{\\cyrtext #1}}\n");
367     368     static docstring const lyxmathsym_def = from_ascii(

** CID 409140:  High impact quality  (GLOBAL_INIT_ORDER)


________________________________________________________________________________________________________
*** CID 409140:  High impact quality  (GLOBAL_INIT_ORDER)
/home/lasgoutt/src/lyx/coverity/lyx/src/LaTeXFeatures.cpp: 463 in ()
457             
"\\DeclareTextCompositeCommand{\\c}{T1}{n}{\\textcommabelow{n}}\n"
458             
"\\DeclareTextCompositeCommand{\\c}{T1}{N}{\\textcommabelow{N}}\n"
459             
"\\DeclareTextCompositeCommand{\\c}{T1}{r}{\\textcommabelow{r}}\n"
460 "\\DeclareTextCompositeCommand{\\c}{T1}{R}{\\textcommabelow{R}}\n"); 461 462 // Use cyrillic fonts to provide letter schwa in text (see #11062)
    CID 409140:  High impact quality  (GLOBAL_INIT_ORDER)
    The constructor of global object "lyx::textschwa_def[abi:cxx11]" itself makes use of global object 
"lyx::lyxerr" defined in another compilation unit.  The order of construction is unspecified, so 
"lyx::textschwa_def[abi:cxx11]" might be created before "lyx::lyxerr" is available.
463     static docstring const textschwa_def = from_ascii(
464             "%% letter schwa missing in Latin fonts, use Cyrillic schwa\n"
465             "\\DeclareTextSymbolDefault{\\CYRSCHWA}{T2A}\n"
466             "\\DeclareTextSymbolDefault{\\cyrschwa}{T2A}\n"
467             "\\ProvideTextCommandDefault{\\textSchwa}{\\CYRSCHWA}\n"
468             "\\ProvideTextCommandDefault{\\textschwa}{\\cyrschwa}\n");

** CID 409139:  High impact quality  (GLOBAL_INIT_ORDER)


________________________________________________________________________________________________________
*** CID 409139:  High impact quality  (GLOBAL_INIT_ORDER)
/home/lasgoutt/src/lyx/coverity/lyx/src/LaTeXFeatures.cpp: 166 in ()
160             "    \\setlength{\\parsep}{0pt plus 1pt}%\n"
161             "  }\n"
162             "  \\item[]\n"
163             "}\n"
164             "{\\end{list}}\n");
165     >>>     CID 409139:  High impact quality  (GLOBAL_INIT_ORDER)
    The constructor of global object "lyx::floatingfootnote_def[abi:cxx11]" itself makes use of global object 
"lyx::theCiteEnginesList" defined in another compilation unit.  The order of construction is unspecified, so 
"lyx::floatingfootnote_def[abi:cxx11]" might be created before "lyx::theCiteEnginesList" is 
available.
166     static docstring const floatingfootnote_def = from_ascii(
167             "%% Special footnote code from the package 'stblftnt.sty'\n"
168             "%% Author: Robin Fairbairns -- Last revised Dec 13 1996\n"
169             "\\let\\SF@@footnote\\footnote\n"
170             "\\def\\footnote{\\ifx\\protect\\@typeset@protect\n"
171             "    \\expandafter\\SF@@footnote\n"

** CID 409138:  High impact quality  (GLOBAL_INIT_ORDER)


________________________________________________________________________________________________________
*** CID 409138:  High impact quality  (GLOBAL_INIT_ORDER)
/home/lasgoutt/src/lyx/coverity/lyx/src/LaTeXFeatures.cpp: 76 in ()
70     static docstring const lyxarrow_def = from_ascii(
71      "\\DeclareRobustCommand*{\\lyxarrow}{%\n"
72      "\\@ifstar\n"
73      "{\\leavevmode\\,$\\triangleleft$\\,\\allowbreak}\n"
74      "{\\leavevmode\\,$\\triangleright$\\,\\allowbreak}}");
75     >>>     CID 409138:  High impact quality  (GLOBAL_INIT_ORDER)
    The constructor of global object "lyx::aastex_case_def[abi:cxx11]" itself makes use of global object 
"lyx::lyxrc" defined in another compilation unit.  The order of construction is unspecified, so 
"lyx::aastex_case_def[abi:cxx11]" might be created before "lyx::lyxrc" is available.
76     static docstring const aastex_case_def = from_ascii(
77              "\\providecommand\\case[2]{\\mbox{$\\frac{#1}{#2}$}}%");
78 // Copied from https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy0Z4BpE-2Fsx7Tw3S-2FzTEdg-2B-2BNgVIk5sSAWNa-2FnT0UzTNFl0TaqhjyIXVEzxkg5IaBaP2T6H2RAapNekx7Ofa-2F7FDEsjBcursMbL-2B6u-2BP4cVrYEY-7_oAivpe0BqaIojkLjliX-2BG3gO8g8YhoOqDVHj4gbeQ0m-2B54Z9Gg86Y1X-2BP2bsYt0XDeI3v8M5sjYgY5W2mUhIDu5EqgQ3gJHc2ysg2KYYOXjwQNTnQgr5lJQ6yxiq68pboV6M6VDkmFBli-2Bs47zFTvXOQKO1wx9GK58KjNjccMqsyzpkbj4rUThqOu6S-2FUBsH8usfj9f4QFbO7wDsI99zSg-3D-3D
79     // Adapted to providecommand for compatibility reasons.
80     81     // ZERO WIDTH SPACE (ZWSP) is actually not a space character

** CID 409137:  High impact quality  (GLOBAL_INIT_ORDER)


________________________________________________________________________________________________________
*** CID 409137:  High impact quality  (GLOBAL_INIT_ORDER)
/home/lasgoutt/src/lyx/coverity/lyx/src/LaTeXFeatures.cpp: 144 in ()
138             "  
\\bgroup\\addfontfeatures{RawFeature=-tlig}\\char34\\egroup}");
139 140 static docstring const textquotesinglep_xetex_def = from_ascii(
141             "\\providecommand\\textquotesingleplain{%\n"
142             "  \\bgroup\\addfontfeatures{Mapping=}\\char39\\egroup}");
143     >>>     CID 409137:  High impact quality  (GLOBAL_INIT_ORDER)
    The constructor of global object "lyx::textquotesinglep_luatex_def[abi:cxx11]" itself makes use of global 
object "lyx::lcolor" defined in another compilation unit.  The order of construction is unspecified, so 
"lyx::textquotesinglep_luatex_def[abi:cxx11]" might be created before "lyx::lcolor" is available.
144     static docstring const textquotesinglep_luatex_def = from_ascii(
145             "\\providecommand\\textquotesingleplain{%\n"
146             "  
\\bgroup\\addfontfeatures{RawFeature=-tlig}\\char39\\egroup}");
147     148     static docstring const paragraphleftindent_def = from_ascii(
149             "\\newenvironment{LyXParagraphLeftIndent}[1]%\n"

** CID 409136:  High impact quality  (GLOBAL_INIT_ORDER)


________________________________________________________________________________________________________
*** CID 409136:  High impact quality  (GLOBAL_INIT_ORDER)
/home/lasgoutt/src/lyx/coverity/lyx/src/LaTeXFeatures.cpp: 390 in ()
384             "\\pagewidth\\paperwidth\n");
385     386     static docstring const cedilla_def = from_ascii(
387 "\\newcommand{\\docedilla}[2]{\\underaccent{#1\\mathchar'30}{#2}}\n"
388             "\\newcommand{\\cedilla}[1]{\\mathpalette\\docedilla{#1}}\n");
389     >>>     CID 409136:  High impact quality  (GLOBAL_INIT_ORDER)
    The constructor of global object "lyx::subring_def[abi:cxx11]" itself makes use of global object 
"lyx::lcolor" defined in another compilation unit.  The order of construction is unspecified, so 
"lyx::subring_def[abi:cxx11]" might be created before "lyx::lcolor" is available.
390     static docstring const subring_def = from_ascii(
391 "\\newcommand{\\dosubring}[2]{\\underaccent{#1\\mathchar'27}{#2}}\n"
392             "\\newcommand{\\subring}[1]{\\mathpalette\\dosubring{#1}}\n");
393     394     static docstring const subdot_def = from_ascii(
395             "\\newcommand{\\dosubdot}[2]{\\underaccent{#1.}{#2}}\n"

** CID 409135:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/lasgoutt/src/lyx/coverity/lyx/src/insets/InsetIndexMacro.cpp: 172 in lyx::InsetIndexMacro::getLatex(lyx::otexstream &, const lyx::OutputParams &) const()


________________________________________________________________________________________________________
*** CID 409135:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/lasgoutt/src/lyx/coverity/lyx/src/insets/InsetIndexMacro.cpp: 172 in lyx::InsetIndexMacro::getLatex(lyx::otexstream &, const lyx::OutputParams &) const()
166                             InsetText::latex(ots, runparams);
167                             odocstringstream ourplain;
168                             InsetText::plaintext(ourplain, runparams);
169                             // These are the LaTeX and plaintext 
representations
170                             docstring latexstr = ourlatex.str();
171                             docstring plainstr = ourplain.str();
    CID 409135:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
    "plainstr" is passed-by-value as parameter to "processLatexSorting" when it 
could be moved instead.
172                             processLatexSorting(os, runparams, latexstr, 
plainstr);
173                     }
174                     return;
175             }
176     177             if (params_.type == InsetIndexMacroParams::See)

** CID 409134:  High impact quality  (GLOBAL_INIT_ORDER)


________________________________________________________________________________________________________
*** CID 409134:  High impact quality  (GLOBAL_INIT_ORDER)
/home/lasgoutt/src/lyx/coverity/lyx/src/LaTeXFeatures.cpp: 67 in ()
61     //\ProvidesPackage{lyx}[1996/01/11 LLE v0.2 (LyX LaTeX Extensions)]
62     //\message{LyX LaTeX Extensions (LLE v0.2) of 11-Jan-1996.}
63     64     static docstring const lyx_def = from_ascii(
65      "{%\n  L\\kern-.1667em\\lower.25em\\hbox{Y}\\kern-.125emX\\@}");
66     >>>     CID 409134:  High impact quality  (GLOBAL_INIT_ORDER)
    The constructor of global object "lyx::noun_def[abi:cxx11]" itself makes use of global object 
"lyx::lyxrc" defined in another compilation unit.  The order of construction is unspecified, so 
"lyx::noun_def[abi:cxx11]" might be created before "lyx::lyxrc" is available.
67     static docstring const noun_def = from_ascii(
68      "\\newcommand{\\noun}[1]{\\textsc{#1}}");
69     70     static docstring const lyxarrow_def = from_ascii(
71      "\\DeclareRobustCommand*{\\lyxarrow}{%\n"
72      "\\@ifstar\n"

** CID 409133:  High impact quality  (GLOBAL_INIT_ORDER)


________________________________________________________________________________________________________
*** CID 409133:  High impact quality  (GLOBAL_INIT_ORDER)
/home/lasgoutt/src/lyx/coverity/lyx/src/LaTeXFeatures.cpp: 87 in ()
81     // ZERO WIDTH SPACE (ZWSP) is actually not a space character
82     // but marks a line break opportunity. Several commands provide a
83     // line break opportunity. They differ in side-effects:
84     // \allowbreak prevents hyphenation after hyphen or dash + ZWSP
85     // \linebreak[<n>] takes an optional argument denoting "urgency".
86 // The \LyXZeroWidthSpace wrapper allows customization in the preamble.
    CID 409133:  High impact quality  (GLOBAL_INIT_ORDER)
    The constructor of global object "lyx::lyxZWSP_def[abi:cxx11]" itself makes use of global object 
"lyx::theCiteEnginesList" defined in another compilation unit.  The order of construction is unspecified, so 
"lyx::lyxZWSP_def[abi:cxx11]" might be created before "lyx::theCiteEnginesList" is available.
87     static docstring const lyxZWSP_def = from_ascii(
88      "\\newcommand*\\LyXZeroWidthSpace{\\hspace{0pt}}");
89 90 // for quotes without babel. This does not give perfect results, but
91     // anybody serious about non-english quotes should use babel (JMarc).
92
** CID 409132:  High impact quality  (GLOBAL_INIT_ORDER)


________________________________________________________________________________________________________
*** CID 409132:  High impact quality  (GLOBAL_INIT_ORDER)
/home/lasgoutt/src/lyx/coverity/lyx/src/LaTeXFeatures.cpp: 426 in ()
420 "\\newcommand{\\doogonek}[2]{\\setbox0=\\hbox{$#1#2$}\\underaccent{#1\\mkern-6mu\n" 421 " \\ifx#2O\\hskip0.5\\wd0\\else\\ifx#2U\\hskip0.5\\wd0\\else\\hskip\\wd0\\fi\\fi\n"
422             "  \\ifx#2o\\mkern-2mu\\else\\ifx#2e\\mkern-1mu\\fi\\fi\n"
423             "  \\mathchar\"0\\hexnumber@\\symtipasymb0C}{#2}}\n"
424             "\\newcommand{\\ogonek}[1]{\\mathpalette\\doogonek{#1}}\n");
425     >>>     CID 409132:  High impact quality  (GLOBAL_INIT_ORDER)
    The constructor of global object "lyx::lyxaccent_def[abi:cxx11]" itself makes use of global object 
"lyx::lyxrc" defined in another compilation unit.  The order of construction is unspecified, so 
"lyx::lyxaccent_def[abi:cxx11]" might be created before "lyx::lyxrc" is available.
426     static docstring const lyxaccent_def = from_ascii(
427 "%% custom text accent \\LyxTextAccent[<rise value (length)>]{<accent>}{<base>}\n"
428             "\\newcommand*{\\LyxTextAccent}[3][0ex]{%\n"
429             "  \\hmode@bgroup\\ooalign{\\null#3\\crcr\\hidewidth\n"
430             "  \\raise#1\\hbox{#2}\\hidewidth}\\egroup}\n"
431             "%% select a font size smaller than the current font size:\n"

** CID 409131:  High impact quality  (GLOBAL_INIT_ORDER)


________________________________________________________________________________________________________
*** CID 409131:  High impact quality  (GLOBAL_INIT_ORDER)
/home/lasgoutt/src/lyx/coverity/lyx/src/LaTeXFeatures.cpp: 409 in ()
403 "\\newcommand{\\dosubtilde}[2]{\\underaccent{#1\\mathchar'176}{#2}}\n"
404             "\\newcommand{\\subtilde}[1]{\\mathpalette\\dosubtilde{#1}}\n");
405     406     static docstring const dacute_def = from_ascii(
407             
"\\DeclareMathAccent{\\dacute}{\\mathalpha}{operators}{'175}\n");
408     >>>     CID 409131:  High impact quality  (GLOBAL_INIT_ORDER)
    The constructor of global object "lyx::tipasymb_def[abi:cxx11]" itself makes use of global object 
"lyx::lyxerr" defined in another compilation unit.  The order of construction is unspecified, so 
"lyx::tipasymb_def[abi:cxx11]" might be created before "lyx::lyxerr" is available.
409     static docstring const tipasymb_def = from_ascii(
410             "\\DeclareFontEncoding{T3}{}{}\n"
411             "\\DeclareSymbolFont{tipasymb}{T3}{cmr}{m}{n}\n");
412     413     static docstring const dgrave_def = from_ascii(
414             "\\DeclareMathAccent{\\dgrave}{\\mathord}{tipasymb}{'15}\n");

** CID 409130:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/lasgoutt/src/lyx/coverity/lyx/src/graphics/GraphicsConverter.cpp: 186 in lyx::graphics::Converter::Impl::startConversion()()


________________________________________________________________________________________________________
*** CID 409130:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/lasgoutt/src/lyx/coverity/lyx/src/graphics/GraphicsConverter.cpp: 186 in lyx::graphics::Converter::Impl::startConversion()()
180                     converted(0, 1);
181                     return;
182             }
183 184 ForkedCall::sigPtr ptr = ForkedCallQueue::add(script_command_);
185             weak_ptr<Converter::Impl> this_ = parent_.pimpl_;
    CID 409130:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
    "this_" is copied in call to copy constructor 
"std::weak_ptr<lyx::graphics::Converter::Impl>", when it could be moved instead.
186             ptr->connect([this_](pid_t pid, int retval){
187                             if (auto p = this_.lock()) {
188                                     p->converted(pid, retval);
189                             }
190                     });
191     }

** CID 409129:  High impact quality  (GLOBAL_INIT_ORDER)


________________________________________________________________________________________________________
*** CID 409129:  High impact quality  (GLOBAL_INIT_ORDER)
/home/lasgoutt/src/lyx/coverity/lyx/src/LaTeXFeatures.cpp: 136 in ()
130             "\\DeclareTextSymbolDefault{\\textquotedbl}{T1}");
131     132     static docstring const textquotedblp_xetex_def = from_ascii(
133             "\\providecommand\\textquotedblplain{%\n"
134             "  \\bgroup\\addfontfeatures{Mapping=}\\char34\\egroup}");
135     >>>     CID 409129:  High impact quality  (GLOBAL_INIT_ORDER)
    The constructor of global object "lyx::textquotedblp_luatex_def[abi:cxx11]" itself makes use of global 
object "lyx::lyxerr" defined in another compilation unit.  The order of construction is unspecified, so 
"lyx::textquotedblp_luatex_def[abi:cxx11]" might be created before "lyx::lyxerr" is available.
136     static docstring const textquotedblp_luatex_def = from_ascii(
137             "\\providecommand\\textquotedblplain{%\n"
138             "  
\\bgroup\\addfontfeatures{RawFeature=-tlig}\\char34\\egroup}");
139 140 static docstring const textquotesinglep_xetex_def = from_ascii(
141             "\\providecommand\\textquotesingleplain{%\n"

** CID 409128:  High impact quality  (GLOBAL_INIT_ORDER)


________________________________________________________________________________________________________
*** CID 409128:  High impact quality  (GLOBAL_INIT_ORDER)
/home/lasgoutt/src/lyx/coverity/lyx/src/LaTeXFeatures.cpp: 355 in ()
349             "\\newcommand{\\lyxobjdeleted}[3]{}\n"
350             "\\newcommand{\\lyxdisplayobjdeleted}[3]{}\n"
351             "\\newcommand{\\lyxudisplayobjdeleted}[3]{}\n");
352     353     static docstring const textgreek_LGR_def = from_ascii(
354             "\\DeclareFontEncoding{LGR}{}{}\n");
    CID 409128:  High impact quality  (GLOBAL_INIT_ORDER)
    The constructor of global object "lyx::textgreek_def[abi:cxx11]" itself makes use of global object 
"lyx::lcolor" defined in another compilation unit.  The order of construction is unspecified, so 
"lyx::textgreek_def[abi:cxx11]" might be created before "lyx::lcolor" is available.
355     static docstring const textgreek_def = from_ascii(
356             "\\DeclareRobustCommand{\\greektext}{%\n"
357             "  
\\fontencoding{LGR}\\selectfont\\def\\encodingdefault{LGR}}\n"
358 "\\DeclareRobustCommand{\\textgreek}[1]{\\leavevmode{\\greektext #1}}\n");
359     360     static docstring const textcyr_T2A_def = from_ascii(

** CID 409127:  High impact quality  (GLOBAL_INIT_ORDER)


________________________________________________________________________________________________________
*** CID 409127:  High impact quality  (GLOBAL_INIT_ORDER)
/home/lasgoutt/src/lyx/coverity/lyx/src/LaTeXFeatures.cpp: 70 in ()
64     static docstring const lyx_def = from_ascii(
65      "{%\n  L\\kern-.1667em\\lower.25em\\hbox{Y}\\kern-.125emX\\@}");
66     67     static docstring const noun_def = from_ascii(
68      "\\newcommand{\\noun}[1]{\\textsc{#1}}");
69     >>>     CID 409127:  High impact quality  (GLOBAL_INIT_ORDER)
    The constructor of global object "lyx::lyxarrow_def[abi:cxx11]" itself makes use of global object 
"lyx::lcolor" defined in another compilation unit.  The order of construction is unspecified, so 
"lyx::lyxarrow_def[abi:cxx11]" might be created before "lyx::lcolor" is available.
70     static docstring const lyxarrow_def = from_ascii(
71      "\\DeclareRobustCommand*{\\lyxarrow}{%\n"
72      "\\@ifstar\n"
73      "{\\leavevmode\\,$\\triangleleft$\\,\\allowbreak}\n"
74      "{\\leavevmode\\,$\\triangleright$\\,\\allowbreak}}");
75
** CID 409126:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/lasgoutt/src/lyx/coverity/lyx/src/Undo.cpp: 459 in lyx::Undo::Private::doUndoRedoAction(lyx::CursorData &, lyx::UndoElementStack &, lyx::UndoElementStack &)()


________________________________________________________________________________________________________
*** CID 409126:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/lasgoutt/src/lyx/coverity/lyx/src/Undo.cpp: 459 in lyx::Undo::Private::doUndoRedoAction(lyx::CursorData &, lyx::UndoElementStack &, lyx::UndoElementStack &)()
453             if (undo.bparams) {
454                     // This is a params undo element
455                     delete otherstack.top().bparams;
456                     otherstack.top().bparams = new 
BufferParams(buffer_.params());
457                     DocumentClassConstPtr olddc = 
buffer_.params().documentClassPtr();
458                     buffer_.params() = *undo.bparams;
    CID 409126:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
    "olddc" is passed-by-value as parameter to "switchBetweenClasses" when it 
could be moved instead.
459 cap::switchBetweenClasses(olddc, buffer_.params().documentClassPtr(),
460                             static_cast<InsetText &>(buffer_.inset()));
461             } else if (dit.inMathed()) {
462                     // We stored the full cell here as there is not much to 
be
463                     // gained by storing just 'a few' paragraphs (most if 
not
464                     // all math inset cells have just one paragraph!)

** CID 409125:  High impact quality  (GLOBAL_INIT_ORDER)


________________________________________________________________________________________________________
*** CID 409125:  High impact quality  (GLOBAL_INIT_ORDER)
/home/lasgoutt/src/lyx/coverity/lyx/src/LaTeXFeatures.cpp: 231 in ()
225             "}\n"
226             "\\DeclareRobustCommand{\\lyxdeleted}[4][]{%\n"
227             "    \\protect\\cbstart\\mklyxdeleted{#4}%\n"
228             "    \\protect\\cbend%\n"
229             "}\n");
230     >>>     CID 409125:  High impact quality  (GLOBAL_INIT_ORDER)
    The constructor of global object "lyx::changetracking_xcolor_ulem_hyperref_def[abi:cxx11]" itself makes 
use of global object "lyx::lyxrc" defined in another compilation unit.  The order of construction is 
unspecified, so "lyx::changetracking_xcolor_ulem_hyperref_def[abi:cxx11]" might be created before 
"lyx::lyxrc" is available.
231 static docstring const changetracking_xcolor_ulem_hyperref_def = from_ascii(
232             "%% Change tracking with ulem, xcolor, and hyperref: ct 
markup\n"
233 "\\DeclareRobustCommand{\\lyxadded}[4][]{\\texorpdfstring{\\mklyxadded{#4}}{#4}}\n" 234 "\\DeclareRobustCommand{\\lyxdeleted}[4][]{\\texorpdfstring{\\mklyxdeleted{#4}}{}}\n"); 235 236 static docstring const changetracking_xcolor_ulem_hyperref_cb_def = from_ascii(


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yoTScfh6B8koVa-2BsXrqsH2r7zUmO9t1iEi-2FFYNyEDxxSQ-3D-3DI-jU_oAivpe0BqaIojkLjliX-2BG3gO8g8YhoOqDVHj4gbeQ0m-2B54Z9Gg86Y1X-2BP2bsYt0XvHl8qI0ouonhHh1Rv09dvcGdMAI-2FfG0AyJOzDEVODxDyaUGYnNAXuA-2BIWZ71bnDPtB6MePNXeuDnmqqSHRRqpXyW-2Fa6B8T8vb49r0tB4PW39LMdRLaPB3z6s2sqraMaAbDXvJJE1eT11-2BNHzvLi5PA-3D-3D

To manage Coverity Scan email notifications for "lasgout...@lyx.org", click https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yped04pjJnmXOsUBtKYNIXx34ydBhiihKDfhACAOxnb-2FpLXfC1-2Fy9ehPf7Z5Xceo-2FDL42s7RhLoI1oCEA5KI6F-2F-2F7H4ELNwbXlqjUEumj4TIw8e4DzuFJoQlGnS5EjzD5g-3DN3p9_oAivpe0BqaIojkLjliX-2BG3gO8g8YhoOqDVHj4gbeQ0m-2B54Z9Gg86Y1X-2BP2bsYt0X2ANxbiwdlDtps8gUqA9IqFSqucWHrdsp8PuyqZgyA6YGM-2B824WIPP3RLd0mvL9-2F9mfiPfPK0b26WqiAeUHQ5bmING8RrT6fEUJPayv7mdE0vl1ZCTSd-2Bzo89IJcy1-2BwAdw7Tx-2BrX7ClF8SGJ0Lxmfw-3D-3D

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to