Compile fixes for buidbots
A few changes to variable declarations so that the buildbots are happy:
- Unsigned var vs. signed var comparisons -- changed some signed ints to unsigned
- I'm pretty sure this is safe from overflow. The affected vars already check for
<= 0
so that they're prevented from overflowing.
- I'm pretty sure this is safe from overflow. The affected vars already check for
- Mixed D&C -- move declarations to top of code blocks
- Some
int
changed toINT32
- This one doesn't really matter -- there are a few places in code where
int
is used -- but it helps portability for other architectures.
- This one doesn't really matter -- there are a few places in code where
- Fix
strncpy(nodenum, msg+3, 5)
calls so that the copy length (5) does not overflow the malloc size of nodenum (3)
Buildbot result before this merge:
- Unsigned vs. signed comparisons: (local build; build the original branch with ERRORMODE=1 to see)
- Mixed D&C: https://circleci.com/gh/mazmazz/SRB2/366
- strncpy overflow: https://travis-ci.org/mazmazz/SRB2/jobs/469284741
Buildbot result ater this merge: