> engine/workdir/UnpackedTarball/afdko/c/addfeatures/hotconv/FeatCtx.cpp: In member function ‘const GPat::ClassRec& FeatCtx::lookupGlyphClass(const std::string&)’:
> engine/workdir/UnpackedTarball/afdko/c/addfeatures/hotconv/FeatCtx.cpp:494:22: error: returning reference to temporary [-Wreturn-local-addr]
> 494 | return GPat::ClassRec {};
> | ^~~~~~~~~~~
and
> engine/workdir/UnpackedTarball/afdko/c/addfeatures/hotconv/GPOS.cpp: In member function ‘GPat::ClassRec& GPOS::getCR(uint32_t, int)’:
> engine/workdir/UnpackedTarball/afdko/c/addfeatures/hotconv/GPOS.cpp:1002:12: error: cannot bind non-const lvalue reference of type ‘GPat::ClassRec&’ to an rvalue of type ‘GPat::ClassRec’
> 1002 | return cr;
> | ^~
presumably new with 6c40019917bd6e88f6b54d0a2d53d64729c64166 "afdko:
upgrade to
5.0.1"
Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: Id8d7f8c924fd270631b6d9a0c97f39a4f8826c74
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4837
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 95050b2a21d0625d97024cc041bd3dd9837ca190)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207286
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
23 lines
788 B
Plaintext
23 lines
788 B
Plaintext
--- c/addfeatures/hotconv/FeatCtx.cpp
|
|
+++ c/addfeatures/hotconv/FeatCtx.cpp
|
|
@@ -490,7 +490,8 @@ const GPat::ClassRec &FeatCtx::lookupGlyphClass(const std::string &gcname) {
|
|
auto search = namedGlyphClasses.find(gcname);
|
|
if ( search == namedGlyphClasses.end() ) {
|
|
featMsg(sFATAL, "glyph class not defined");
|
|
- return GPat::ClassRec {};
|
|
+ static const GPat::ClassRec empty;
|
|
+ return empty;
|
|
}
|
|
return search->second;
|
|
}
|
|
--- c/addfeatures/hotconv/GPOS.cpp
|
|
+++ c/addfeatures/hotconv/GPOS.cpp
|
|
@@ -997,7 +997,7 @@ GPat::ClassRec &GPOS::getCR(uint32_t cls, int classDefInx) {
|
|
g->logger->log(sFATAL, "class <%u> not valid in classDef", cls);
|
|
*/
|
|
assert(false);
|
|
- GPat::ClassRec cr;
|
|
+ static GPat::ClassRec cr;
|
|
return cr;
|
|
}
|