Subject: Re: build error in icmp6.c
To: None <itojun@iijlab.net>
From: Todd Vierling <tv@pobox.com>
List: current-users
Date: 06/13/2000 11:45:21
: > 	how can I suppress the warning in this case?  it looks that macppc
: > 	treats char as unsigned char, while for i386 char is signed.
: > 	if the char is signed, I really need to check for negative numbers. 

: > 	const char *a;
: > 	int alen;
: > 	const char *b;
: > 	int blen;

: > 	if (a[0] < 0 || b[0] < 0)	<---	line 1419 in the above
: > 		return 0;

This depends on _why_ you need to check for negative numbers.

Based on what I see in the code:

- this might be better using unsigned char * for the argument, if it is not
  a `public exported' API

- for the best-case workaround, cast these to `int' before checking if they
  are less than 0 (...do not cast to `signed char').

-- 
-- Todd Vierling (tv@pobox.com)