| Summary: | dev-libs/libusb-1.0.25 libusb/os/linux_usbfs.c:1452:19: error: 'active_config' may be used uninitialized in this function | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | rx80 <rokfaith> |
| Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | adel.ks, jstein, mail, sam |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| URL: | https://github.com/libusb/libusb/issues/1063 | ||
| See Also: | https://github.com/libusb/libusb/pull/1062 | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | build.log | ||
Created attachment 764365 [details]
build.log
Build works fine with ABI_X86="64" Fails with ABI_X86="32 64" Please * paste the emerge info as described on https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket After further investigation, it turns out that changing CFLAGS -O3 to -O2 "fixes" it. Please close this bug if this is an unsupported configuration. Please report the issue upstream. https://github.com/libusb/libusb/issues *** Bug 832998 has been marked as a duplicate of this bug. *** Upstream PR at https://github.com/libusb/libusb/pull/1062 fixes the issue for me. Maybe we should include this trivial patch in dev-libs/libusb ebuild to prevent user's @world updates from failing? (In reply to Maciej S. Szmigiero from comment #7) > Upstream PR at https://github.com/libusb/libusb/pull/1062 fixes the issue > for me. > > Maybe we should include this trivial patch in dev-libs/libusb ebuild to > prevent user's @world updates from failing? Nobody is making folks use -O3 but yes, sure, I was just waiting for it to be merged, but it is indeed simple. I'll add it in a bit. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=057e21919e19feb2fd4d51e2bf18d3c0b4512a61 commit 057e21919e19feb2fd4d51e2bf18d3c0b4512a61 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-02-20 22:14:46 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-02-20 23:08:37 +0000 dev-libs/libusb: fix build failure with -O3 Upstream patch (not yet merged, but simple enough) which works around a build failure (false positive) with -O3. Closes: https://bugs.gentoo.org/832732 Signed-off-by: Sam James <sam@gentoo.org> .../files/libusb-1.0.25-fix-O3-warning.patch | 32 ++++++++++++++++++++++ dev-libs/libusb/libusb-1.0.25.ebuild | 4 +++ 2 files changed, 36 insertions(+) |
fails to build with error: /var/tmp/portage/dev-libs/libusb-1.0.25/work/libusb-1.0.25/libusb/os/linux_usbfs.c: In function 'op_get_configuration': /var/tmp/portage/dev-libs/libusb-1.0.25/work/libusb-1.0.25/libusb/os/linux_usbfs.c:1452:19: error: 'active_config' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1452 | *config = (uint8_t)active_config; | ^~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors Reproducible: Always