diff options
author | Wei Li <weili@chromium.org> | 2016-03-11 17:00:48 -0800 |
---|---|---|
committer | Wei Li <weili@chromium.org> | 2016-03-11 17:00:48 -0800 |
commit | 97da97662417085774f75c26e535c6fbe70266ae (patch) | |
tree | 9654be693dfb20b49be80911fa8089ff319757f3 /core/include/fxcrt/fx_system.h | |
parent | 55265016faac358266af280db6c62afa34ce2891 (diff) | |
download | pdfium-97da97662417085774f75c26e535c6fbe70266ae.tar.xz |
Re-enable MSVC warning 4800 for compiling with chromium_code
Mainly change the code to avoid the warnings; in a few cases we have
to use explicit casts.
BUG=pdfium:29
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1783023002 .
Diffstat (limited to 'core/include/fxcrt/fx_system.h')
-rw-r--r-- | core/include/fxcrt/fx_system.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/include/fxcrt/fx_system.h b/core/include/fxcrt/fx_system.h index 76c413e7e3..f62e126fbb 100644 --- a/core/include/fxcrt/fx_system.h +++ b/core/include/fxcrt/fx_system.h @@ -258,10 +258,12 @@ wchar_t* FXSYS_wcsupr(wchar_t* str); #define FXDWORD_FROM_MSBFIRST(i) \ (((uint8_t)(i) << 24) | ((uint8_t)((i) >> 8) << 16) | \ ((uint8_t)((i) >> 16) << 8) | (uint8_t)((i) >> 24)) -#define FXDWORD_GET_LSBFIRST(p) \ - ((p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0])) -#define FXDWORD_GET_MSBFIRST(p) \ - ((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | (p[3])) +#define FXDWORD_GET_LSBFIRST(p) \ + ((static_cast<FX_DWORD>(p[3]) << 24) | (static_cast<FX_DWORD>(p[2]) << 16) | \ + (static_cast<FX_DWORD>(p[1]) << 8) | (static_cast<FX_DWORD>(p[0]))) +#define FXDWORD_GET_MSBFIRST(p) \ + ((static_cast<FX_DWORD>(p[0]) << 24) | (static_cast<FX_DWORD>(p[1]) << 16) | \ + (static_cast<FX_DWORD>(p[2]) << 8) | (static_cast<FX_DWORD>(p[3]))) #define FXSYS_HIBYTE(word) ((uint8_t)((word) >> 8)) #define FXSYS_LOBYTE(word) ((uint8_t)(word)) #define FXSYS_HIWORD(dword) ((FX_WORD)((dword) >> 16)) |