[Scummvm-cvs-logs] SF.net SVN: scummvm: [32474] scummvm/trunk/common
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Jun 1 22:05:22 CEST 2008
Revision: 32474
http://scummvm.svn.sourceforge.net/scummvm/?rev=32474&view=rev
Author: thebluegr
Date: 2008-06-01 13:05:21 -0700 (Sun, 01 Jun 2008)
Log Message:
-----------
Fixed MSVC warnings
Modified Paths:
--------------
scummvm/trunk/common/unarj.cpp
scummvm/trunk/common/unarj.h
Modified: scummvm/trunk/common/unarj.cpp
===================================================================
--- scummvm/trunk/common/unarj.cpp 2008-06-01 19:07:57 UTC (rev 32473)
+++ scummvm/trunk/common/unarj.cpp 2008-06-01 20:05:21 UTC (rev 32474)
@@ -550,7 +550,7 @@
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 @@
_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 @@
#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_len() {
- int16 c;
+ int16 c = 0;
int16 width;
int16 plus;
int16 pwr;
Modified: scummvm/trunk/common/unarj.h
===================================================================
--- scummvm/trunk/common/unarj.h 2008-06-01 19:07:57 UTC (rev 32473)
+++ scummvm/trunk/common/unarj.h 2008-06-01 20:05:21 UTC (rev 32474)
@@ -44,13 +44,13 @@
#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)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list