- code cleanup based on additional gcc warnings

This commit is contained in:
Mark Vejvoda 2013-11-19 07:05:45 +00:00
parent ad7569ded1
commit 929cc07895
2 changed files with 4 additions and 3 deletions

View File

@ -301,9 +301,9 @@ void Selection::saveGame(XmlNode *rootNode) const {
selectedUnitsNode->addAttribute("unitId",intToStr(unit->getId()), mapTagReplacements);
}
// UnitContainer groups[maxGroups];
for(unsigned int x = 0; x < maxGroups; ++x) {
for(unsigned int x = 0; x < (unsigned int)maxGroups; ++x) {
XmlNode *groupsNode = selectionNode->addChild("groups");
for(unsigned int i = 0; i < groups[x].size(); ++i) {
for(unsigned int i = 0; i < (unsigned int)groups[x].size(); ++i) {
Unit *unit = groups[x][i];
XmlNode *selectedUnitsNode = groupsNode->addChild("selectedUnits");

View File

@ -330,7 +330,8 @@ unsigned int pack(unsigned char *buf, const char *format, ...) {
packi64(buf, q);
buf += 8;
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("pack int64 = " MG_I64_SPECIFIER " [%X] q = " MG_I64_SPECIFIER " [%lX] buf pos = %lu\n",(int64)*(buf-8),*(buf-8),q,q,(unsigned long)(buf - bufStart));
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("pack int64 = " MG_I64_SPECIFIER " [%X] q = " MG_I64_SPECIFIER " [%lX] buf pos = %lu\n",(int64)*(buf-8),*(buf-8),q,q,(unsigned long)(buf - bufStart));
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("pack int64 = " MG_I64_SPECIFIER " [%X] q = " MG_I64_SPECIFIER " buf pos = %lu\n",(int64)*(buf-8),*(buf-8),q,(unsigned long)(buf - bufStart));
break;
case 'Q': // 64-bit unsigned