New warning (or at least I only noticed it now)

José Matos jaomatos at gmail.com
Tue Nov 22 01:47:26 UTC 2022


On Mon, 2022-11-21 at 23:08 +0100, Pavel Sanda wrote:
> Can you try whether the attached changes anything? P

It does, now those attached are what remains.

-- 
José Abílio
-------------- next part --------------
/home/jamatos/lyx/lyx.anon/src/Converter.cpp: In member function ‘lyx::Converters::RetVal lyx::Converters::convert(const lyx::Buffer*, const lyx::support::FileName&, const lyx::support::FileName&, const lyx::support::FileName&, const std::string&, const std::string&, lyx::ErrorList&, int, bool)’:
/home/jamatos/lyx/lyx.anon/src/Converter.cpp:714:55: warning: possibly dangling reference to a temporary [-Wdangling-reference]
  714 |                                         Mover const & mover = getMover(conv.to());
      |                                                       ^~~~~
/home/jamatos/lyx/lyx.anon/src/Converter.cpp:714:71: note: the temporary was destroyed at the end of the full expression ‘lyx::getMover(lyx::Converter::to() const())’
  714 |                                         Mover const & mover = getMover(conv.to());
      |                                                               ~~~~~~~~^~~~~~~~~~~
/home/jamatos/lyx/lyx.anon/src/Converter.cpp:786:39: warning: possibly dangling reference to a temporary [-Wdangling-reference]
  786 |                         Mover const & mover = getMover(conv.from());
      |                                       ^~~~~
/home/jamatos/lyx/lyx.anon/src/Converter.cpp:786:55: note: the temporary was destroyed at the end of the full expression ‘lyx::getMover(lyx::Converter::from() const())’
  786 |                         Mover const & mover = getMover(conv.from());
      |                                               ~~~~~~~~^~~~~~~~~~~~~

/home/jamatos/lyx/lyx.anon/src/ParagraphMetrics.cpp: In member function ‘int lyx::ParagraphMetrics::rightMargin(const lyx::BufferView&) const’:
/home/jamatos/lyx/lyx.anon/src/ParagraphMetrics.cpp:119:39: warning: possibly dangling reference to a temporary [-Wdangling-reference]
  119 |         frontend::FontMetrics const & fm = theFontMetrics(params.getFont());
      |                                       ^~
/home/jamatos/lyx/lyx.anon/src/ParagraphMetrics.cpp:119:58: note: the temporary was destroyed at the end of the full expression ‘lyx::theFontMetrics((& params)->lyx::BufferParams::getFont())’
  119 |         frontend::FontMetrics const & fm = theFontMetrics(params.getFont());
      |                                            ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~

/home/jamatos/lyx/lyx.anon/src/Text.cpp: In member function ‘const lyx::CompletionList* lyx::Text::createCompletionList(const lyx::Cursor&) const’:
/home/jamatos/lyx/lyx.anon/src/Text.cpp:2394:26: warning: possibly dangling reference to a temporary [-Wdangling-reference]
 2394 |         WordList const & list = theWordList(cur.getFont().language()->lang());
      |                          ^~~~
/home/jamatos/lyx/lyx.anon/src/Text.cpp:2394:44: note: the temporary was destroyed at the end of the full expression ‘lyx::theWordList(lyx::Language::lang() const())’
 2394 |         WordList const & list = theWordList(cur.getFont().language()->lang());
      |                                 ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/home/jamatos/lyx/lyx.anon/src/TextMetrics.cpp: In member function ‘int lyx::TextMetrics::labelFill(const lyx::Row&) const’:
/home/jamatos/lyx/lyx.anon/src/TextMetrics.cpp:782:29: warning: possibly dangling reference to a temporary [-Wdangling-reference]
  782 |         FontMetrics const & fm
      |                             ^~
/home/jamatos/lyx/lyx.anon/src/TextMetrics.cpp:783:33: note: the temporary was destroyed at the end of the full expression ‘lyx::theFontMetrics(((lyx::Text*)((const lyx::TextMetrics*)this)->lyx::TextMetrics::text_)->lyx::Text::labelFont((* & par)))’
  783 |                 = theFontMetrics(text_->labelFont(par));
      |                   ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/home/jamatos/lyx/lyx.anon/src/TextMetrics.cpp: In member function ‘lyx::Row lyx::TextMetrics::tokenizeParagraph(lyx::pit_type) const’:
/home/jamatos/lyx/lyx.anon/src/TextMetrics.cpp:898:45: warning: possibly dangling reference to a temporary [-Wdangling-reference]
  898 |                         FontMetrics const & fm = theFontMetrics(text_->labelFont(par));
      |                                             ^~
/home/jamatos/lyx/lyx.anon/src/TextMetrics.cpp:898:64: note: the temporary was destroyed at the end of the full expression ‘lyx::theFontMetrics(((lyx::Text*)((const lyx::TextMetrics*)this)->lyx::TextMetrics::text_)->lyx::Text::labelFont((* & par)))’
  898 |                         FontMetrics const & fm = theFontMetrics(text_->labelFont(par));
      |                                                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/home/jamatos/lyx/lyx.anon/src/TextMetrics.cpp: In member function ‘int lyx::TextMetrics::leftMargin(lyx::pit_type, lyx::pos_type) const’:
/home/jamatos/lyx/lyx.anon/src/TextMetrics.cpp:1753:29: warning: possibly dangling reference to a temporary [-Wdangling-reference]
 1753 |         FontMetrics const & bfm = theFontMetrics(buffer.params().getFont());
      |                             ^~~
/home/jamatos/lyx/lyx.anon/src/TextMetrics.cpp:1753:49: note: the temporary was destroyed at the end of the full expression ‘lyx::theFontMetrics((&(& buffer)->lyx::Buffer::params())->lyx::BufferParams::getFont())’
 1753 |         FontMetrics const & bfm = theFontMetrics(buffer.params().getFont());
      |                                   ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~

/home/jamatos/lyx/lyx.anon/src/insets/InsetGraphics.cpp: In function ‘const std::pair<lyx::{anonymous}::GraphicsCopyStatus, lyx::support::FileName> lyx::{anonymous}::copyFileIfNeeded(const lyx::support::FileName&, const lyx::support::FileName&)’:
/home/jamatos/lyx/lyx.anon/src/insets/InsetGraphics.cpp:558:23: warning: possibly dangling reference to a temporary [-Wdangling-reference]
  558 |         Mover const & mover = getMover(theFormats().getFormatFromFile(file_in));
      |                       ^~~~~
/home/jamatos/lyx/lyx.anon/src/insets/InsetGraphics.cpp:558:39: note: the temporary was destroyed at the end of the full expression ‘lyx::getMover(lyx::Formats::getFormatFromFile(const lyx::support::FileName&) const((* & file_in)))’
  558 |         Mover const & mover = getMover(theFormats().getFormatFromFile(file_in));
      |                               ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


More information about the lyx-devel mailing list