Skip to content
Commit b98a5e04 authored by David Majnemer's avatar David Majnemer
Browse files

ObjectFileMachO: Silence signed/unsigned comparison warning

File::SeekFromStart returns an off_t representing the position of the
file after seeking.  This return value is always going to be one of two
values: the input or -1 in the case of failure.

ObjectFileMachO compares an expression of type off_t from the return of
File::SeekFromStart(segment.fileoff) and compares it for equality with
segment.fileoff.

The type of segment_command_64::fileoff is unsigned while off_t is
signed, comparing them emits a diagnostic under GCC.

Instead, we can just compare SeekFromSTart with -1 to see if we
successfully seeked.

Differential Revision: http://reviews.llvm.org/D4634

llvm-svn: 213822
parent abea8fa6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment