samples: fixed warnings
authorJerome St-Louis <jerome@ecere.com>
Thu, 7 Aug 2014 06:34:52 +0000 (02:34 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 7 Aug 2014 06:34:52 +0000 (02:34 -0400)
samples/audio/S3MPlayer/S3MPlayer.ec
samples/guiAndGfx/floodFill/floodFill.ec

index 55280f7..33b02c6 100644 (file)
@@ -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;
          }
index 704c3d4..114baae 100644 (file)
@@ -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