Bug 13201 - SYSTEMD build failed with GCC 7.x
Summary: SYSTEMD build failed with GCC 7.x
Status: RESOLVED MOVED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2020.08
Hardware: PC Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-11 14:02 UTC by Oleg Ivanov
Modified: 2024-06-15 14:55 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Ivanov 2020-09-11 14:02:21 UTC
systemd 246 bring back 'nonnull' warning (see https://github.com/systemd/systemd/pull/15704).
GCC 7.x produces false positive nonnull warnings and fails to compile systemd.
GCC 9.x are OK.

../src/journal/sd-journal.c: In function ‘sd_journal_open_files_fd’:
../src/journal/sd-journal.c:1293:28: error: argument 2 null where non-null expected [-Werror=nonnull]
                         fd = openat(j->toplevel_fd, skip_slash(path), O_RDONLY|O_CLOEXEC|O_NONBLOCK);
                         ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../src/journal/sd-journal.c:1295:28: error: argument 1 null where non-null expected [-Werror=nonnull]
                         fd = open(path, O_RDONLY|O_CLOEXEC|O_NONBLOCK);
                         ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 1 Yann E. MORIN 2024-06-15 14:55:18 UTC
Thank you for your report.

The issue tracker for the Buildroot project has been moved to
the Gitlab.com issue tracker:
    https://gitlab.com/buildroot.org/buildroot/-/issues

We are taking this opportunity to close old issues in this old
tracker. If you believe your issue is still relevant, please
open one in the new issue tracker.

Thank you!