diff options
author | Wei Li <weili@chromium.org> | 2016-03-21 11:20:44 -0700 |
---|---|---|
committer | Wei Li <weili@chromium.org> | 2016-03-21 11:20:44 -0700 |
commit | d4e8f1222ca17b57ac74019b2fc3706e1192645c (patch) | |
tree | 0dd5e1627fd684205631f875cbf5946178177766 /core/fxcodec/codec/fx_codec_tiff.cpp | |
parent | 34fa8d90ae2f60fae219e4dbeff14c053d2e8eef (diff) | |
download | pdfium-d4e8f1222ca17b57ac74019b2fc3706e1192645c.tar.xz |
Re-enable several MSVC warnings
Re-enable the following warnings:
4245: signed/unsigned conversion mismatch;
4310: cast may truncate data;
4389: operator on signed/unsigned mismatch;
4701: use potentially uninitialized local variable;
4706: assignment within conditional expression
Clean up the code to avoid those warnings.
BUG=pdfium:29
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1801383002 .
Diffstat (limited to 'core/fxcodec/codec/fx_codec_tiff.cpp')
-rw-r--r-- | core/fxcodec/codec/fx_codec_tiff.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fxcodec/codec/fx_codec_tiff.cpp b/core/fxcodec/codec/fx_codec_tiff.cpp index 2af92f2f12..0312622fb4 100644 --- a/core/fxcodec/codec/fx_codec_tiff.cpp +++ b/core/fxcodec/codec/fx_codec_tiff.cpp @@ -122,20 +122,20 @@ static toff_t _tiff_seek(thandle_t context, toff_t offset, int whence) { case 2: if (pTiffContext->isDecoder) { if (pTiffContext->io.in->GetSize() < (FX_FILESIZE)offset) { - return -1; + return static_cast<toff_t>(-1); } pTiffContext->offset = (FX_DWORD)(pTiffContext->io.in->GetSize() - offset); } else { if (pTiffContext->io.out->GetSize() < (FX_FILESIZE)offset) { - return -1; + return static_cast<toff_t>(-1); } pTiffContext->offset = (FX_DWORD)(pTiffContext->io.out->GetSize() - offset); } break; default: - return -1; + return static_cast<toff_t>(-1); } ASSERT(pTiffContext->isDecoder ? (pTiffContext->offset <= (FX_DWORD)pTiffContext->io.in->GetSize()) |