Skip to content

Commit

Permalink
Fix some GCC warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jorio committed Feb 3, 2022
1 parent 1f06890 commit 0fa4466
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ int GetTextWidth( SkittlesFontPtr font, const char *text )
int width = 0;
while( *text )
{
width += font->width[*text++];
width += font->width[(uint8_t) *text++];
}

return width;
Expand Down
1 change: 0 additions & 1 deletion src/level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,6 @@ void SharewareVictory( void )
MRect bufferDstRect = { 0, 0, 480, 300 };
MPoint dPoint = { 450, 50 }, lPoint, cPoint;
int scroll, ticks, x, y;
int delay = 2;
const char* text;
int thisFade;
const char fade[120] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0
Expand Down
2 changes: 1 addition & 1 deletion src/pause.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ static void DrawHiScoreContents( int *item, int shade )
{
scan = line[index];
while( *scan )
dPoint[index].h -= smallFont->width[*scan++];
dPoint[index].h -= smallFont->width[(uint8_t) * scan++];

dPoint[index].h /= 2;
}
Expand Down
2 changes: 1 addition & 1 deletion src/score.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void ShowScore( int player )
void DrawCharacter( char which, const MRect *myRect )
{
MRect srcRect;
char count, result;
int count, result;

result = -1;
for( count = 0; count < arrsize(characterList); count++ )
Expand Down
2 changes: 1 addition & 1 deletion src/tutorial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ static int CalculateBalloonWidth( char *message )
break;

default:
currentWidth += balloonFont->width[in];
currentWidth += balloonFont->width[(uint8_t) in];
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/zap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void ZapScoreDisplay( int player, int amount, int multiplier, int x, int y, int

zapScoreWidth[player] = 0;
scan = zapScore[player];
while( *scan ) zapScoreWidth[player] += zapFont->width[*scan++];
while( *scan ) zapScoreWidth[player] += zapFont->width[(uint8_t) * scan++];

if( (zapScorePt[player].h + zapScoreWidth[player] + 8) > (kGridAcross * kBlobHorizSize) )
{
Expand Down

0 comments on commit 0fa4466

Please sign in to comment.