diff options
author | Filippos Karapetis | 2008-06-01 20:05:21 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-06-01 20:05:21 +0000 |
commit | f5d9eb32f03cb55d8d46d4622a1732f77981346b (patch) | |
tree | a0df3e234151026e3128dc88847d07bce75b7e77 /common | |
parent | 49dd9376ad6aeb42ab69362bcc2856598b19931a (diff) | |
download | scummvm-rg350-f5d9eb32f03cb55d8d46d4622a1732f77981346b.tar.gz scummvm-rg350-f5d9eb32f03cb55d8d46d4622a1732f77981346b.tar.bz2 scummvm-rg350-f5d9eb32f03cb55d8d46d4622a1732f77981346b.zip |
Fixed MSVC warnings
svn-id: r32474
Diffstat (limited to 'common')
-rw-r--r-- | common/unarj.cpp | 8 | ||||
-rw-r--r-- | common/unarj.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/common/unarj.cpp b/common/unarj.cpp index 64203d5c66..58f326c1ac 100644 --- a/common/unarj.cpp +++ b/common/unarj.cpp @@ -550,7 +550,7 @@ void ArjFile::decode() { r = 0; while (count < _origsize) { - if ((c = decode_c()) <= UCHAR_MAX) { + if ((c = decode_c()) <= ARJ_UCHAR_MAX) { _text[r] = (byte) c; count++; if (++r >= DDICSIZ) { @@ -558,7 +558,7 @@ void ArjFile::decode() { _outstream->write(_text, DDICSIZ); } } else { - j = c - (UCHAR_MAX + 1 - THRESHOLD); + j = c - (ARJ_UCHAR_MAX + 1 - THRESHOLD); count += j; i = decode_p(); if ((i = r - i - 1) < 0) @@ -591,7 +591,7 @@ void ArjFile::decode() { #define GETBITS(c,l) {if(_getlen<l)BFIL c=(uint16)_getbuf>>(CODE_BIT-l);BPUL(l)} int16 ArjFile::decode_ptr() { - int16 c; + int16 c = 0; int16 width; int16 plus; int16 pwr; @@ -612,7 +612,7 @@ int16 ArjFile::decode_ptr() { } int16 ArjFile::decode_len() { - int16 c; + int16 c = 0; int16 width; int16 plus; int16 pwr; diff --git a/common/unarj.h b/common/unarj.h index 28424f70bd..289ab52ad0 100644 --- a/common/unarj.h +++ b/common/unarj.h @@ -44,13 +44,13 @@ namespace Common { #define CODE_BIT 16 #define CHAR_BIT 8 -#define UCHAR_MAX 255 +#define ARJ_UCHAR_MAX 255 // UCHAR_MAX is defined in limits.h in MSVC #define THRESHOLD 3 #define DDICSIZ 26624 #define MAXDICBIT 16 #define MATCHBIT 8 #define MAXMATCH 256 -#define NC (UCHAR_MAX + MAXMATCH + 2 - THRESHOLD) +#define NC (ARJ_UCHAR_MAX + MAXMATCH + 2 - THRESHOLD) #define NP (MAXDICBIT + 1) #define CBIT 9 #define NT (CODE_BIT + 3) |