Bug 13201

Summary: SYSTEMD build failed with GCC 7.x
Product: buildroot Reporter: Oleg Ivanov <oaivanov>
Component: OtherAssignee: unassigned
Status: RESOLVED MOVED    
Severity: normal CC: buildroot, yann.morin.1998
Priority: P5    
Version: 2020.08   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:

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!