Add -Wunsafe-loop-optimizations compiler flag and fix all warnings

This commit is contained in:
Behdad Esfahbod 2006-08-07 14:24:32 -07:00 committed by Carl Worth
parent 744ef3bf69
commit d1f9bef30e
3 changed files with 6 additions and 5 deletions

View file

@ -535,6 +535,7 @@ WARN_CFLAGS=""
if test "x$GCC" = "xyes"; then
WARN_CFLAGS="-Wall -Wsign-compare -Werror-implicit-function-declaration \
-Wstrict-aliasing=2 -Wpointer-arith -Wwrite-strings -Winit-self \
-Wunsafe-loop-optimizations \
-Wpacked -Wmissing-format-attribute -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement \
-Wnested-externs -fno-strict-aliasing -Wold-style-definition"

View file

@ -1060,7 +1060,7 @@ fbCompositeSolidMask_nx8888x8888Cmmx (pixman_operator_t op,
while (height--)
{
int twidth = width;
unsigned int twidth = width;
CARD32 *p = (CARD32 *)maskLine;
CARD32 *q = (CARD32 *)dstLine;
@ -2020,7 +2020,7 @@ fbCompositeSolidMask_nx8888x0565Cmmx (pixman_operator_t op,
while (height--)
{
int twidth = width;
unsigned int twidth = width;
CARD32 *p = (CARD32 *)maskLine;
CARD16 *q = (CARD16 *)dstLine;
@ -2270,7 +2270,7 @@ fbSolidFillmmx (FbPixels *pDraw,
while (height--)
{
int w;
unsigned int w;
CARD8 *d = byte_line;
byte_line += stride;
w = byte_width;
@ -2386,7 +2386,7 @@ fbCopyAreammx (FbPixels *pSrc,
while (height--)
{
int w;
unsigned int w;
CARD8 *s = src_bytes;
CARD8 *d = dst_bytes;
src_bytes += src_stride;

View file

@ -2423,7 +2423,7 @@ _cairo_xlib_surface_add_glyph (Display *dpy,
break;
case CAIRO_FORMAT_ARGB32:
if (_native_byte_order_lsb() != (ImageByteOrder (dpy) == LSBFirst)) {
int c = glyph_surface->stride * glyph_surface->height;
unsigned int c = glyph_surface->stride * glyph_surface->height;
unsigned char *d;
unsigned char *new, *n;