浏览代码

* Fixed remaining warnings with gcc 3.x and 4.x

tags/v0.99.beta14
Jean-Yves Lamoureux jylam 19 年前
父节点
当前提交
dd5668d9f0
共有 4 个文件被更改,包括 9 次插入7 次删除
  1. +5
    -3
      examples/aafire.c
  2. +1
    -1
      examples/cacaball.c
  3. +2
    -2
      examples/cacamoir.c
  4. +1
    -1
      examples/cacaplas.c

+ 5
- 3
examples/aafire.c 查看文件

@@ -92,7 +92,7 @@ initialize (void)
{
int i;
#ifdef LIBCACA
int r[256], g[256], b[256], a[256];
unsigned int r[256], g[256], b[256], a[256];
#endif

#ifdef LIBCACA
@@ -177,7 +177,9 @@ firemain (void)
#endif
i = 0;
#define END (bitmap + XSIZ * YSIZ)
for (p = bitmap; p <= (unsigned char *) (END); p += 1)
for (p = (unsigned char*)bitmap;
(char*)p <= (( char *) (END));
p += 1)
{
*p = table[(*(p + XSIZ - 1) + *(p + XSIZ + 1) + *(p + XSIZ)) +
(*(p + 2 * XSIZ - 1) + *(p + 2 * XSIZ + 1))];
@@ -205,7 +207,7 @@ drawfire (void)
loop = rand () % 3, sloop++;;
i1 = 1;
i2 = 4 * XSIZ + 1;
for (p = (char *) bitmap + XSIZ * (YSIZ + 0);
for (p = (unsigned char *) bitmap + XSIZ * (YSIZ + 0);
p < ((unsigned char *) bitmap + XSIZ * (YSIZ + 1));
p++, i1 += 4, i2 -= 4)
{


+ 1
- 1
examples/cacaball.c 查看文件

@@ -52,7 +52,7 @@ static unsigned char metaball[METASIZE * METASIZE];

int main(int argc, char **argv)
{
int r[256], g[256], b[256], a[256];
unsigned int r[256], g[256], b[256], a[256];
float d[METABALLS], di[METABALLS], dj[METABALLS], dk[METABALLS];
unsigned int x[METABALLS], y[METABALLS];
struct caca_bitmap *caca_bitmap;


+ 2
- 2
examples/cacamoir.c 查看文件

@@ -44,7 +44,7 @@ static void draw_line(int, int, char);

int main (int argc, char **argv)
{
int red[256], green[256], blue[256], alpha[256];
unsigned int red[256], green[256], blue[256], alpha[256];
struct caca_bitmap *bitmap;
int i, x, y, frame = 0, pause = 0;

@@ -118,7 +118,7 @@ end:

static void put_disc(int x, int y)
{
char *src = disc + (DISCSIZ / 2 - x) + (DISCSIZ / 2 - y) * DISCSIZ;
char *src = ((char*)disc) + (DISCSIZ / 2 - x) + (DISCSIZ / 2 - y) * DISCSIZ;
int i, j;

for(j = 0; j < YSIZ; j++)


+ 1
- 1
examples/cacaplas.c 查看文件

@@ -47,7 +47,7 @@ static void do_plasma(unsigned char *,

int main (int argc, char **argv)
{
int red[256], green[256], blue[256], alpha[256];
unsigned int red[256], green[256], blue[256], alpha[256];
double r[3], R[6];
struct caca_bitmap *bitmap;
int i, x, y, frame = 0, pause = 0;


正在加载...
取消
保存