Opened 3 years ago

Closed 13 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)

Changed 3 years ago by mt

comment:1 Changed 3 years ago by mt

Has a Patch: set

Changed 3 years ago by mt

Attachment: file_systems_buildlog.txt added

comment:2 Changed 3 years ago by pulkomandy

Has a Patch: unset

comment:3 Changed 3 years ago by pulkomandy

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 Changed 13 months ago by waddlesplash

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.