Subject: misc/14531: lint misses conversion warning.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <christos@zoulas.com>
List: netbsd-bugs
Date: 11/10/2001 20:30:40
>Number:         14531
>Category:       misc
>Synopsis:       lint misses conversion warning.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 10 17:31:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Christos Zoulas
>Release:        
>Organization:
	Chaos, Inc.
>Environment:
System: NetBSD beowulf.gw.com 1.5X NetBSD 1.5X (GW-GENERIC) #36: Sat Jul 28 11:41:19 EDT 2001 kim@nix.suominen.org:/net/nix/src-3/NetBSD/cvsroot/src/sys/arch/i386/compile/GW-GENERIC i386
Architecture: i386
Machine: i386
>Description:
	Lint does not produce conversion warnings for non integral types.
>How-To-Repeat:
#include <sys/types.h>

void
fug16(u_int16_t a, u_int8_t v) {
	a = v;
	v = a;
}

void
fug32(u_int32_t a, u_int8_t v) {
	a = v;
	v = a;
}

void
main() {
	unsigned long foo = 1;
	fug16(foo, 3);
	fug32(foo, 3);
}

lint -chap fug.c

Notice that there is only one warning produced by the invocation of fug1().

>Fix:
None, sorry.
>Release-Note:
>Audit-Trail:
>Unformatted:
 	Sat Nov 10 20:29:30 EST 2001