package/sane-backends: fix gcc-4.8 compile
PATCH 1/1 package/sane-backends: fix gcc-4.8 compile
Add patch to use legacy initializer variant to fix gcc-4.8 compile.
Fixes:
- http://autobuild.buildroot.net/results/9d1cd0d0aa8c929c4b1b23b04075c331c1be80e0
genesys/utilities.h:229:23: error: invalid initialization of non-const reference of type 'std::basic_ios<char>&' from an rvalue of type '<brace-enclosed initializer list>'
stream_{stream}
^
genesys/image_pipeline.cpp:715:19: error: invalid initialization of non-const reference of type 'genesys::ImagePipelineNode&' from an rvalue of type '<brace-enclosed initializer list>'
source_{source}
^--- .../0002-genesys-fix-gcc-4.8-compile.patch | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 package/sane-backends/0002-genesys-fix-gcc-4.8-compile.patch
package/sane-backends/0002-genesys-fix-gcc-4.8-compile.patch new file +50 -0
@@ -0,0 +1,50 @@ +From f67cfd6a534e9faaca83afebd61a6d77d7837174 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Mon, 15 Mar 2021 20:53:55 +0100 +Subject: [PATCH] genesys: fix gcc-4.8 compile + +Fixes: + + genesys/utilities.h:229:23: error: invalid initialization of non-const reference of type 'std::basic_ios<char>&' from an rvalue of type '<brace-enclosed initializer list>' + stream_{stream} + ^ + genesys/image_pipeline.cpp:715:19: error: invalid initialization of non-const reference of type 'genesys::ImagePipelineNode&' from an rvalue of type '<brace-enclosed initializer list>' + source_{source} + ^ + +[Upstream: https://gitlab.com/sane-project/backends/-/merge_requests/609] +Signed-off-by: Peter Seiderer <[email protected]> +--- + backend/genesys/image_pipeline.cpp | 2 +- + backend/genesys/utilities.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/backend/genesys/image_pipeline.cpp b/backend/genesys/image_pipeline.cpp +index 4161e95..14e2f8d 100644 +--- a/backend/genesys/image_pipeline.cpp ++++ b/backend/genesys/image_pipeline.cpp +@@ -712,7 +712,7 @@ ImagePipelineNodeCalibrate::ImagePipelineNodeCalibrate(ImagePipelineNode& source + const std::vector<std::uint16_t>& bottom, + const std::vector<std::uint16_t>& top, + std::size_t x_start) : +- source_{source} ++ source_(source) + { + std::size_t size = 0; + if (bottom.size() >= x_start && top.size() >= x_start) { +diff --git a/backend/genesys/utilities.h b/backend/genesys/utilities.h +index 6e637d0..2ef2ddd 100644 +--- a/backend/genesys/utilities.h ++++ b/backend/genesys/utilities.h +@@ -226,7 +226,7 @@ class BasicStreamStateSaver + { + public: + explicit BasicStreamStateSaver(std::basic_ios<Char, Traits>& stream) : +- stream_{stream} ++ stream_(stream) + { + flags_ = stream_.flags(); + width_ = stream_.width(); +-- +2.30.1 +
Signature · 1 line
2.30.1
Thomas Petazzoni
AppliedPATCH 1/1 package/sane-backends: fix gcc-4.8 compile
Quoted 13 lines · On Mon, 15 Mar 2021 21:13:45 +0100 Peter Seiderer <[email protected]> wrote:
Add patch to use legacy initializer variant to fix gcc-4.8 compile.
Fixes:
- http://autobuild.buildroot.net/results/9d1cd0d0aa8c929c4b1b23b04075c331c1be80e0
genesys/utilities.h:229:23: error: invalid initialization of non-const reference of type 'std::basic_ios<char>&' from an rvalue of type '<brace-enclosed initializer list>'stream_{stream} ^ genesys/image_pipeline.cpp:715:19: error: invalid initialization of non-const reference of type 'genesys::ImagePipelineNode&' from an rvalue of type '<brace-enclosed initializer list>' source_{source} ^
Quoted 5 lines
Signed-off-by Peter Seiderer <[email protected]>--- .../0002-genesys-fix-gcc-4.8-compile.patch | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 package/sane-backends/0002-genesys-fix-gcc-4.8-compile.patch
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com