* [Buildroot] [PATCH 1/1] package/sconeserver: fix build with gcc 11
@ 2021-08-10 9:14 Fabrice Fontaine
2021-08-12 21:47 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2021-08-10 9:14 UTC (permalink / raw)
To: buildroot; +Cc: Simon Dawson, Fabrice Fontaine
Fix the following build failure with gcc 11:
In file included from ../sconex/sconex.h:229,
from ../sconex/Descriptor.h:63,
from Descriptor.cpp:22:
Descriptor.cpp: In member function 'void scx::Descriptor::add_stream(scx::Stream*)':
Descriptor.cpp:150:22: error: ordered comparison of pointer with integer zero ('scx::Stream*' and 'int')
150 | DEBUG_ASSERT(stream>=0,"add_stream() Invalid stream");
| ~~~~~~^~~
Descriptor.cpp: In member function 'bool scx::Descriptor::remove_stream(scx::Stream*)':
Descriptor.cpp:204:22: error: ordered comparison of pointer with integer zero ('scx::Stream*' and 'int')
204 | DEBUG_ASSERT(stream>=0,"remove_stream() Invalid stream");
| ~~~~~~^~~
Fixes:
- http://autobuild.buildroot.org/results/ccc9562e83fd2bd312d21b3124be42dfe4b7e850
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...Descriptor.cpp-fix-build-with-gcc-11.patch | 54 +++++++++++++++++++
1 file changed, 54 insertions(+)
create mode 100644 package/sconeserver/0001-sconex-Descriptor.cpp-fix-build-with-gcc-11.patch
diff --git a/package/sconeserver/0001-sconex-Descriptor.cpp-fix-build-with-gcc-11.patch b/package/sconeserver/0001-sconex-Descriptor.cpp-fix-build-with-gcc-11.patch
new file mode 100644
index 0000000000..335be82f7d
--- /dev/null
+++ b/package/sconeserver/0001-sconex-Descriptor.cpp-fix-build-with-gcc-11.patch
@@ -0,0 +1,54 @@
+From 5e4cb613d9bb287e9f54da86f99a51d0338b1faa Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Tue, 10 Aug 2021 10:36:53 +0200
+Subject: [PATCH] sconex/Descriptor.cpp: fix build with gcc 11
+
+Fix the following build failure with gcc 11:
+
+In file included from ../sconex/sconex.h:229,
+ from ../sconex/Descriptor.h:63,
+ from Descriptor.cpp:22:
+Descriptor.cpp: In member function 'void scx::Descriptor::add_stream(scx::Stream*)':
+Descriptor.cpp:150:22: error: ordered comparison of pointer with integer zero ('scx::Stream*' and 'int')
+ 150 | DEBUG_ASSERT(stream>=0,"add_stream() Invalid stream");
+ | ~~~~~~^~~
+ | ^~~~
+Descriptor.cpp: In member function 'bool scx::Descriptor::remove_stream(scx::Stream*)':
+Descriptor.cpp:204:22: error: ordered comparison of pointer with integer zero ('scx::Stream*' and 'int')
+ 204 | DEBUG_ASSERT(stream>=0,"remove_stream() Invalid stream");
+ | ~~~~~~^~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/ccc9562e83fd2bd312d21b3124be42dfe4b7e850
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/sconemad/sconeserver/pull/4]
+---
+ sconex/Descriptor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sconex/Descriptor.cpp b/sconex/Descriptor.cpp
+index 590adba..4adfd86 100644
+--- a/sconex/Descriptor.cpp
++++ b/sconex/Descriptor.cpp
+@@ -147,7 +147,7 @@ bool Descriptor::dup(int d)
+ //=============================================================================
+ void Descriptor::add_stream(Stream* stream)
+ {
+- DEBUG_ASSERT(stream>=0,"add_stream() Invalid stream");
++ DEBUG_ASSERT(stream!=0,"add_stream() Invalid stream");
+
+ m_streams.push_back(stream);
+ stream->set_endpoint(this);
+@@ -201,7 +201,7 @@ void Descriptor::add_stream_after(Stream* stream,const Stream* after)
+ //=============================================================================
+ bool Descriptor::remove_stream(Stream* stream)
+ {
+- DEBUG_ASSERT(stream>=0,"remove_stream() Invalid stream");
++ DEBUG_ASSERT(stream!=0,"remove_stream() Invalid stream");
+
+ std::list<Stream*>::iterator it = m_streams.begin();
+ while (it != m_streams.end()) {
+--
+2.30.2
+
--
2.30.2
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/sconeserver: fix build with gcc 11
2021-08-10 9:14 [Buildroot] [PATCH 1/1] package/sconeserver: fix build with gcc 11 Fabrice Fontaine
@ 2021-08-12 21:47 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2021-08-12 21:47 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Simon Dawson, buildroot
On Tue, 10 Aug 2021 11:14:45 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Fix the following build failure with gcc 11:
>
> In file included from ../sconex/sconex.h:229,
> from ../sconex/Descriptor.h:63,
> from Descriptor.cpp:22:
> Descriptor.cpp: In member function 'void scx::Descriptor::add_stream(scx::Stream*)':
> Descriptor.cpp:150:22: error: ordered comparison of pointer with integer zero ('scx::Stream*' and 'int')
> 150 | DEBUG_ASSERT(stream>=0,"add_stream() Invalid stream");
> | ~~~~~~^~~
> Descriptor.cpp: In member function 'bool scx::Descriptor::remove_stream(scx::Stream*)':
> Descriptor.cpp:204:22: error: ordered comparison of pointer with integer zero ('scx::Stream*' and 'int')
> 204 | DEBUG_ASSERT(stream>=0,"remove_stream() Invalid stream");
> | ~~~~~~^~~
>
> Fixes:
> - http://autobuild.buildroot.org/results/ccc9562e83fd2bd312d21b3124be42dfe4b7e850
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ...Descriptor.cpp-fix-build-with-gcc-11.patch | 54 +++++++++++++++++++
> 1 file changed, 54 insertions(+)
> create mode 100644 package/sconeserver/0001-sconex-Descriptor.cpp-fix-build-with-gcc-11.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-12 21:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-10 9:14 [Buildroot] [PATCH 1/1] package/sconeserver: fix build with gcc 11 Fabrice Fontaine
2021-08-12 21:47 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox