diff options
author | D G Turner | 2018-10-07 05:36:06 +0100 |
---|---|---|
committer | D G Turner | 2018-10-07 05:36:06 +0100 |
commit | 5d40a61b6021126a30b6bca03d282544cdadcfce (patch) | |
tree | f50142e82bf9cbbedc56f9da044c5923af8d23cc | |
parent | fe654d221893a13c11415a95190070ae11c71e23 (diff) | |
download | scummvm-rg350-5d40a61b6021126a30b6bca03d282544cdadcfce.tar.gz scummvm-rg350-5d40a61b6021126a30b6bca03d282544cdadcfce.tar.bz2 scummvm-rg350-5d40a61b6021126a30b6bca03d282544cdadcfce.zip |
DEVTOOLS: Fix Compiler Warnings in create_access Tool.
These were various shadowed variable and unsigned vs. signed
comparison warnings.
-rw-r--r-- | devtools/create_access/create_access_dat.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/devtools/create_access/create_access_dat.cpp b/devtools/create_access/create_access_dat.cpp index 0fac1d8c55..85d90a9d08 100644 --- a/devtools/create_access/create_access_dat.cpp +++ b/devtools/create_access/create_access_dat.cpp @@ -167,7 +167,7 @@ void writeMartianCommonData(int argc, char *argv[]) { // Total up the first 256 bytes of the executable as a simplified checksum uint fileChecksum = 0; - for (int idx = 0; idx < 256; ++idx) + for (int i = 0; i < 256; ++i) fileChecksum += exeFile.readByte(); if (fileChecksum == 10454) { @@ -176,8 +176,8 @@ void writeMartianCommonData(int argc, char *argv[]) { #define FONT_COUNT 119 const int FONT_WIDTHS[2] = { 0x47E6, 0x4C9C }; const int FONT_CHAR_OFFSETS[2] = { 0x46F8, 0x4BAE }; - const int FONT_DATA_SIZE[2] = { 849, 907 }; - int idx, dataOffset; + const uint FONT_DATA_SIZE[2] = { 849, 907 }; + int dataOffset; for (int fontNum = 0; fontNum < 2; ++fontNum) { // Write out sizes @@ -191,14 +191,14 @@ void writeMartianCommonData(int argc, char *argv[]) { // Write out character offsets uint offsets[FONT_COUNT]; exeFile.seek(DATA_SEGMENT + FONT_CHAR_OFFSETS[fontNum]); - for (int idx = 0; idx < FONT_COUNT; ++idx) { - offsets[idx] = exeFile.readWord(); - if (idx == 0) + for (int i = 0; i < FONT_COUNT; ++i) { + offsets[i] = exeFile.readWord(); + if (i == 0) dataOffset = offsets[0]; - offsets[idx] -= dataOffset; - assert(offsets[idx] < FONT_DATA_SIZE[fontNum]); + offsets[i] -= dataOffset; + assert(offsets[i] < FONT_DATA_SIZE[fontNum]); - outputFile.writeWord(offsets[idx]); + outputFile.writeWord(offsets[i]); } // Write out character data |