Re: [AD] gcc-4.0.0 problems |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Milan Mimica wrote:
And that would be all.
Excellent. Please give this patch a whirl.
I guess we will come up with similar problems on other platforms, but at
least they are trivial.
Peter
Index: src/x/xwin.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/x/xwin.c,v
retrieving revision 1.90
diff -u -r1.90 xwin.c
--- src/x/xwin.c 23 Apr 2005 13:50:09 -0000 1.90
+++ src/x/xwin.c 27 Apr 2005 11:44:32 -0000
@@ -787,7 +787,8 @@
_xwin.fast_visual_depth = _xwin_private_fast_visual_depth();
/* Create screen bitmap from frame buffer. */
- return _xwin_private_create_screen_bitmap(drv, _xwin.ximage->data + _xwin.ximage->xoffset,
+ return _xwin_private_create_screen_bitmap(drv,
+ (unsigned char *)_xwin.ximage->data + _xwin.ximage->xoffset,
_xwin.ximage->bytes_per_line);
}
@@ -1479,7 +1480,7 @@
return 0;
/* Use first line of XImage for test. */
- p8 = _xwin.ximage->data + _xwin.ximage->xoffset;
+ p8 = (uint8_t *) _xwin.ximage->data + _xwin.ximage->xoffset;
p16 = (uint16_t*) p8;
p32 = (uint32_t*) p8;
Index: src/unix/alsa9.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/unix/alsa9.c,v
retrieving revision 1.13
diff -u -r1.13 alsa9.c
--- src/unix/alsa9.c 23 Apr 2005 11:29:25 -0000 1.13
+++ src/unix/alsa9.c 27 Apr 2005 11:44:33 -0000
@@ -77,8 +77,9 @@
static snd_pcm_t *pcm_handle;
static unsigned char *alsa_bufdata;
-static int alsa_bits, alsa_signed, alsa_rate, alsa_stereo;
-static int alsa_fragments;
+static int alsa_bits, alsa_signed, alsa_stereo;
+static unsigned int alsa_rate;
+static unsigned int alsa_fragments;
static int alsa_sample_size;
static struct pollfd *ufds = NULL;
@@ -285,8 +286,9 @@
{
int ret = 0;
char tmp1[128], tmp2[128];
- int format = 0, numfrags = 0;
- snd_pcm_sframes_t fragsize;
+ int format = 0;
+ unsigned int numfrags = 0;
+ snd_pcm_uframes_t fragsize;
if (input) {
ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Input is not supported"));
@@ -304,7 +306,7 @@
alsa_mixer_device);
fragsize = get_config_int(uconvert_ascii("sound", tmp1),
- uconvert_ascii("alsa_fragsize", tmp2), -1);
+ uconvert_ascii("alsa_fragsize", tmp2), 0);
numfrags = get_config_int(uconvert_ascii("sound", tmp1),
uconvert_ascii("alsa_numfrags", tmp2),
@@ -369,8 +371,8 @@
alsa_sample_size = (alsa_bits / 8) * (alsa_stereo ? 2 : 1);
- if (fragsize < 0) {
- int size = alsa_rate * ALSA_DEFAULT_BUFFER_MS / 1000 / numfrags;
+ if (fragsize == 0) {
+ unsigned int size = alsa_rate * ALSA_DEFAULT_BUFFER_MS / 1000 / numfrags;
fragsize = 1;
while (fragsize < size)
fragsize <<= 1;
Index: tools/dat2c.c
===================================================================
RCS file: /cvsroot/alleg/allegro/tools/dat2c.c,v
retrieving revision 1.17
diff -u -r1.17 dat2c.c
--- tools/dat2c.c 21 Apr 2004 09:04:52 -0000 1.17
+++ tools/dat2c.c 27 Apr 2005 11:44:34 -0000
@@ -755,7 +755,7 @@
const unsigned char *s = va_arg(va,
const unsigned char *);
- _cwrite_esc(fp, s, strlen(s));
+ _cwrite_esc(fp, s, strlen((const char *)s));
}
else if (!strncmp(rd, "$string lower$", 14)) {
Index: tools/textconv.c
===================================================================
RCS file: /cvsroot/alleg/allegro/tools/textconv.c,v
retrieving revision 1.6
diff -u -r1.6 textconv.c
--- tools/textconv.c 2 Aug 2004 11:33:09 -0000 1.6
+++ tools/textconv.c 27 Apr 2005 11:44:34 -0000
@@ -190,7 +190,7 @@
if (out_flip)
c = ((c&0xFF)<<8) | ((c&0xFF00)>>8);
- size = out_type->u_setc(buf, c);
+ size = out_type->u_setc((char *)buf, c);
for (i=0; i<size; i++) {
if (flag_c) {
Index: examples/expackf.c
===================================================================
RCS file: /cvsroot/alleg/allegro/examples/expackf.c,v
retrieving revision 1.4
diff -u -r1.4 expackf.c
--- examples/expackf.c 23 Apr 2005 13:47:59 -0000 1.4
+++ examples/expackf.c 27 Apr 2005 11:44:34 -0000
@@ -242,7 +242,7 @@
PACKFILE *f;
MEMREAD_INFO memread_info;
BITMAP *bmp, *bmp2;
- char *block;
+ unsigned char *block;
int l1, l2;
PACKFILE *f1, *f2;
Index: examples/exspline.c
===================================================================
RCS file: /cvsroot/alleg/allegro/examples/exspline.c,v
retrieving revision 1.11
diff -u -r1.11 exspline.c
--- examples/exspline.c 13 Feb 2005 21:01:30 -0000 1.11
+++ examples/exspline.c 27 Apr 2005 11:44:34 -0000
@@ -84,6 +84,7 @@
n.x = node.x - (prev.x - node.x) / 8;
n.y = node.y - (prev.y - node.y) / 8;
+ n.tangent = itofix(0);
return n;
}