[Scummvm-cvs-logs] SF.net SVN: scummvm:[54394] scummvm/trunk/tools/create_mads/parser.cpp
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Sat Nov 20 11:10:19 CET 2010
Revision: 54394
http://scummvm.svn.sourceforge.net/scummvm/?rev=54394&view=rev
Author: dreammaster
Date: 2010-11-20 10:10:18 +0000 (Sat, 20 Nov 2010)
Log Message:
-----------
TOOLS: Fixed some compiler warnings in create_mads tool
Modified Paths:
--------------
scummvm/trunk/tools/create_mads/parser.cpp
Modified: scummvm/trunk/tools/create_mads/parser.cpp
===================================================================
--- scummvm/trunk/tools/create_mads/parser.cpp 2010-11-20 10:00:24 UTC (rev 54393)
+++ scummvm/trunk/tools/create_mads/parser.cpp 2010-11-20 10:10:18 UTC (rev 54394)
@@ -143,7 +143,7 @@
char source_buffer[MAX_SOURCE_LINE_LENGTH]; // Source file buffer
char token_string[MAX_TOKEN_STRING_LENGTH]; // Token string
-char *bufferp = source_buffer; // Source buffer ptr
+const char *bufferp = source_buffer; // Source buffer ptr
char *tokenp = token_string; // Token string ptr
int digit_count; // Total no. of digits in number
@@ -244,11 +244,10 @@
*/
void init_scanner(const char *name) {
// Initialise character table
- int ch;
- for (ch = 0; ch < 256; ++ch) char_table[ch] = SPECIAL;
- for (ch = '0'; ch <= '9'; ++ch) char_table[ch] = DIGIT;
- for (ch = 'A'; ch <= 'Z'; ++ch) char_table[ch] = LETTER;
- for (ch = 'a'; ch <= 'z'; ++ch) char_table[ch] = LETTER;
+ for (int i = 0; i < 256; ++i) char_table[i] = SPECIAL;
+ for (int i = '0'; i <= '9'; ++i) char_table[i] = DIGIT;
+ for (int i = 'A'; i <= 'Z'; ++i) char_table[i] = LETTER;
+ for (int i = 'a'; i <= 'z'; ++i) char_table[i] = LETTER;
char_table[EOF_CHAR] = EOF_CODE;
char_table[EOL_CHAR] = EOL_CODE;
char_table[(int)'$'] = DIGIT; // Needed for hexadecimal number handling
@@ -810,9 +809,8 @@
* Extract a number token and set literal to it's value. Set token to NUMBER
*/
void get_number() {
- int nvalue = 0; // Value of number
- int digit_count = 0; // Total no. of digits in number */
- bool count_error = false;// Too many digits in number?
+ digit_count = 0; // Total no. of digits in number */
+ count_error = false; // Too many digits in number?
do {
*tokenp++ = ch;
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