From: Jerome St-Louis Date: Thu, 7 Aug 2014 06:34:52 +0000 (-0400) Subject: samples: fixed warnings X-Git-Tag: 0.44.10~12 X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?p=sdk;a=commitdiff_plain;h=870b0de9f4bac500dc2823011ff7dfab8f301b46 samples: fixed warnings --- diff --git a/samples/audio/S3MPlayer/S3MPlayer.ec b/samples/audio/S3MPlayer/S3MPlayer.ec index 55280f7..33b02c6 100644 --- a/samples/audio/S3MPlayer/S3MPlayer.ec +++ b/samples/audio/S3MPlayer/S3MPlayer.ec @@ -342,7 +342,7 @@ class S3M } if(com != 255 && com) { - char fx = 'A'+(char)com-1; + char fx = (char)('A'+com-1); printf("%c%02X\n", fx, info); switch(fx) { @@ -392,7 +392,7 @@ class S3M if(ins || gotVolume) { lastInst[channel] = &instruments[ins-1]; - PlayNote(mixer, ins ? &instruments[ins-1] : null, note, octave, lastInst[channel] ? (byte)(volume*lastInst[channel]->header.volume/63) : (byte)volume, channel+1); + PlayNote(mixer, ins ? &instruments[ins-1] : null, note, octave, lastInst[channel] ? (byte)(volume*lastInst[channel]->header.volume/63) : (byte)volume, (uint16)(channel+1)); } offsets[channel] = 0; } diff --git a/samples/guiAndGfx/floodFill/floodFill.ec b/samples/guiAndGfx/floodFill/floodFill.ec index 704c3d4..114baae 100644 --- a/samples/guiAndGfx/floodFill/floodFill.ec +++ b/samples/guiAndGfx/floodFill/floodFill.ec @@ -57,7 +57,7 @@ void FloodFill(Surface surface, int x0, int y0, ColorAlpha newColor) if(*pictureUp == oldColor) { if(!upIn) - stack.Add({ (uint16)x, (uint16)y - 1}); + stack.Add({ (uint16)x, (uint16)(y - 1)}); upIn = true; } else @@ -69,7 +69,7 @@ void FloodFill(Surface surface, int x0, int y0, ColorAlpha newColor) if(*pictureDown == oldColor) { if(!downIn) - stack.Add({ (uint16)x, (uint16)y + 1}); + stack.Add({ (uint16)x, (uint16)(y + 1)}); downIn = true; } else