diff options
author | dreammaster | 2019-06-22 04:15:20 +0100 |
---|---|---|
committer | Paul Gilbert | 2019-06-22 14:40:50 -0700 |
commit | 2cf0320569c80c8e389e44d1b0463792ddf8e7cd (patch) | |
tree | f71d988b3b8dc6948d004551fd2a4e02697f2aea /engines/glk/alan2/reverse.cpp | |
parent | 2450df501c152249fe1002a7dee70642563d40a3 (diff) | |
download | scummvm-rg350-2cf0320569c80c8e389e44d1b0463792ddf8e7cd.tar.gz scummvm-rg350-2cf0320569c80c8e389e44d1b0463792ddf8e7cd.tar.bz2 scummvm-rg350-2cf0320569c80c8e389e44d1b0463792ddf8e7cd.zip |
GLK: ALAN2: Fixing gcc warnings
Diffstat (limited to 'engines/glk/alan2/reverse.cpp')
-rw-r--r-- | engines/glk/alan2/reverse.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/glk/alan2/reverse.cpp b/engines/glk/alan2/reverse.cpp index a79ae02a47..34d50d9d5e 100644 --- a/engines/glk/alan2/reverse.cpp +++ b/engines/glk/alan2/reverse.cpp @@ -37,12 +37,11 @@ namespace Alan2 { Aword reversed(Aword w /* IN - The ACODE word to swap bytes of */) { Aword s; /* The swapped ACODE word */ char *wp, *sp; - int i; wp = (char *) &w; sp = (char *) &s; - for (i = 0; i < sizeof(Aword); i++) + for (uint i = 0; i < sizeof(Aword); i++) sp[sizeof(Aword) - 1 - i] = wp[i]; return s; @@ -346,10 +345,8 @@ static void reverseRuls(Aword adr) { */ void reverseHdr(AcdHdr *hdr) { - int i; - - /* Reverse all words in the header except the first (version marking) */ - for (i = 1; i < sizeof(AcdHdr) / sizeof(Aword); i++) + // Reverse all words in the header except the first (version marking) + for (uint i = 1; i < sizeof(AcdHdr) / sizeof(Aword); i++) reverse(&((Aword *)hdr)[i]); } |