Permalink
Browse files

Merge pull request #1181 from psineur/fix-stringFormatWarnings-XCode4

Fix XCode 4.4 compiler warnings about string formatting.
  • Loading branch information...
2 parents 6cd457a + 3279432 commit c01a799316454c60de2d403cbe16b852d574eff6 @minggo minggo committed Aug 16, 2012
Showing with 4 additions and 4 deletions.
  1. +3 −3 cocos2dx/label_nodes/CCLabelBMFont.cpp
  2. +1 −1 cocos2dx/platform/ios/ES1Renderer.m
@@ -651,17 +651,17 @@ void CCBMFontConfiguration::parseCharacterDefinition(std::string line, ccBMFontD
index = line.find("xoffset=");
index2 = line.find(' ', index);
value = line.substr(index, index2-index);
- sscanf(value.c_str(), "xoffset=%d", &characterDefinition->xOffset);
+ sscanf(value.c_str(), "xoffset=%hd", &characterDefinition->xOffset);
// Character yoffset
index = line.find("yoffset=");
index2 = line.find(' ', index);
value = line.substr(index, index2-index);
- sscanf(value.c_str(), "yoffset=%d", &characterDefinition->yOffset);
+ sscanf(value.c_str(), "yoffset=%hd", &characterDefinition->yOffset);
// Character xadvance
index = line.find("xadvance=");
index2 = line.find(' ', index);
value = line.substr(index, index2-index);
- sscanf(value.c_str(), "xadvance=%d", &characterDefinition->xAdvance);
+ sscanf(value.c_str(), "xadvance=%hd", &characterDefinition->xAdvance);
}
void CCBMFontConfiguration::parseKerningCapacity(std::string line)
@@ -185,7 +185,7 @@ -(CGSize) backingSize
- (NSString*) description
{
- return [NSString stringWithFormat:@"<%@ = %08X | size = %ix%i>", [self class], self, backingWidth_, backingHeight_];
+ return [NSString stringWithFormat:@"<%@ = %p | size = %ix%i>", [self class], self, backingWidth_, backingHeight_];
}

0 comments on commit c01a799

Please sign in to comment.