Re: [SQU] compiler warnings

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sat, 17 Feb 2001 08:36:36 +0100

Florin Andrei wrote:

> cc-1107 cc: WARNING File = structs.h, Line = 1869
> A signed bit field has a length of 1 bit.
>
> int closing:1;
> ^

Sane warning. I wonder why GCC does not care..

fixed.

> But i also got this:
>
> cc-1183 cc: WARNING File = wccp.c, Line = 228
> An unsigned integer is being compared to zero.
>
> if (len < 0)
> ^

This is a bug. size_t used where it should be ssize_t (or int).

fixed.

> And this (which seems more ugly):
>
> cc-1183 cc: WARNING File = store_swapmeta.c, Line = 133
> An unsigned integer is being compared to zero.
>
> if (type < STORE_META_VOID || type > STORE_META_END) {
> ^

The mips compiler apparently defaults to char being unsigned (which is a
perfectly valid thing to do).

> cc-1188 cc: WARNING File = HttpRequest.c, Line = 139
> The indicated type qualifier is meaningless on cast type.
>
> strLen(req->urlpath) + 1 +
> ^

This too is probably caused by char being unsigned.

/Henrik
Received on Sat Feb 17 2001 - 00:35:55 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:32 MST