diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-07-24 00:24:12 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-07-24 00:24:12 +0000 |
commit | b98a5e04acecb32ada6c3039e86a7beaa5e451cc (patch) | |
tree | c0bccd8952bab5e53b25a5daa4f58caa92e33cf2 /clang/lib/Lex/Preprocessor.cpp | |
parent | abea8fa61d98c94a8b28e27e8885191346996a0f (diff) | |
download | llvm-b98a5e04acecb32ada6c3039e86a7beaa5e451cc.zip llvm-b98a5e04acecb32ada6c3039e86a7beaa5e451cc.tar.gz llvm-b98a5e04acecb32ada6c3039e86a7beaa5e451cc.tar.bz2 |
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
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
0 files changed, 0 insertions, 0 deletions