Summary: | x11-misc/slim-1.3.6-r5 - /.../panel.cpp: error: ordered comparison of pointer with integer zero (GC {aka _XGC*} and int) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | martin, xavier.miller |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 732706 | ||
Attachments: |
emerge-info.txt
emerge-history.txt environment etc.portage.tar.bz2 logs.tar.bz2 temp.tar.bz2 x11-misc:slim-1.3.6-r5:20210428-153705.log Patch to fix signed comparison with nullptr |
Description
Toralf Förster
![]() Created attachment 703335 [details]
emerge-info.txt
Created attachment 703338 [details]
emerge-history.txt
Created attachment 703341 [details]
environment
Created attachment 703344 [details]
etc.portage.tar.bz2
Created attachment 703347 [details]
logs.tar.bz2
Created attachment 703350 [details]
temp.tar.bz2
Created attachment 703353 [details]
x11-misc:slim-1.3.6-r5:20210428-153705.log
Created attachment 705765 [details, diff]
Patch to fix signed comparison with nullptr
Comment to the patch, since it might look wrong at a first glance: All documentation about the return value of XCreateGC I found states that it returns a proper pointer and in the error case sets some failure stat. In particular, I found no documentation that it returns a "negative" pointer. The cleanest patch would probably be to check the failure stat, but since I am not sure about it, the most reasonable analogous check to the original code is to check whether we get a null pointer returned. (Very likely, neither the original code nor the patch work properly in the error case, but at least the patch fixes the compilation issue and causes no regression in the non-error case.) (In reply to Martin Väth from comment #9) > Comment to the patch, since it might look wrong at a first glance: > > All documentation about the return value of XCreateGC I found states that it > returns a proper pointer and in the error case sets some failure stat. In > particular, I found no documentation that it returns a "negative" pointer. > > The cleanest patch would probably be to check the failure stat, but since I > am not sure about it, the most reasonable analogous check to the original > code is to check whether we get a null pointer returned. (Very likely, > neither the original code nor the patch work properly in the error case, but > at least the patch fixes the compilation issue and causes no regression in > the non-error case.) Can confirm that the patch fixes building with gcc-11.1.0, thanks. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ab287d52bf8f597b107156a07e70a6348fecfbd commit 1ab287d52bf8f597b107156a07e70a6348fecfbd Author: Sam James <sam@gentoo.org> AuthorDate: 2021-07-25 23:10:55 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-07-25 23:23:34 +0000 x11-misc/slim: EAPI 7, cmake-utils--, fix build with GCC 11 Closes: https://bugs.gentoo.org/786498 Signed-off-by: Sam James <sam@gentoo.org> x11-misc/slim/files/slim-1.3.6-config.diff | 4 +-- x11-misc/slim/files/slim-1.3.6-freetype.patch | 4 +-- x11-misc/slim/files/slim-1.3.6-gcc11.patch | 12 +++++++ x11-misc/slim/files/slim-1.3.6-honour-cflags.patch | 4 +-- .../slim-1.3.6-strip-systemd-unit-install.patch | 4 +-- x11-misc/slim/slim-1.3.6-r5.ebuild | 31 +++++++++------- x11-misc/slim/slim-9999.ebuild | 42 +++++++++++----------- 7 files changed, 59 insertions(+), 42 deletions(-) |