Opened 3 years ago

Closed 16 months ago

#12770 closed bug (fixed)

[Patch] file_systems: fix gcc6 build

Reported by: mt Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: File Systems Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All


In ObjectTracker::AddTrackable() and ObjectTracker::RemoveTrackable(), gcc6 warms '-Werror=nonnull-compare', but I don't know if this can be NULL here. So I suppress warnings with Jamfiles.

Attachments (2)

0022-file_systems-fix-gcc6-build.patch (2.2 KB ) - added by mt 3 years ago.
file_systems_buildlog.txt (18.9 KB ) - added by mt 3 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by mt, 3 years ago

Has a Patch: set

by mt, 3 years ago

Attachment: file_systems_buildlog.txt added

comment:2 by pulkomandy, 3 years ago

Has a Patch: unset

comment:3 by pulkomandy, 3 years ago

The warning does indicate a real problem: these functions are checking the "this" pointer against NULL, which is not allowed by the C++ standard.

If this was just an attempt at a "safety check" and not meant to be used, it should be removed. If calling this function with a NULL this pointer is intended behavior, then it should be refactored to not need that (for example, it could be made a static method explicitly taking the object in a parameter).

comment:4 by waddlesplash, 16 months ago

Resolution: fixed
Status: newclosed

This was fixed by disabling null-pointer checks in the kernel.

Note: See TracTickets for help on using tickets.