Opened 9 years ago

Closed 6 years 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:
Platform: All

Description

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 9 years ago.
file_systems_buildlog.txt (18.9 KB ) - added by mt 9 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by mt, 9 years ago

patch: 01

by mt, 9 years ago

Attachment: file_systems_buildlog.txt added

comment:2 by pulkomandy, 8 years ago

patch: 10

comment:3 by pulkomandy, 8 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, 6 years ago

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.