Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jan 2003 19:24:56 -0500
From:      Mikhail Teterin <mi+mx@aldan.algebra.com>
To:        questions@FreeBSD.org
Subject:   What's wrong -- -Wconversion?
Message-ID:  <200301101924.56353.mi%2Bmx@aldan.algebra.com>

next in thread | raw e-mail | index | archive | help
The following little file

	#include <netinet/in.h>

	uint16_t f(uint16_t in) {
		return htons(in);
	}

, when compiled with -Wconversion:

	cc -Wconversion -c t.c

, gives the following mistery warning:

	t.c: In function `f':
	t.c:4: warning: passing arg 1 of `__bswap16' with different width due to 
prototype

The compiler is:
	Using built-in specs.
	Configured with: FreeBSD/i386 system compiler
	Thread model: posix
	gcc version 3.2.1 [FreeBSD] 20021119 (release)

Any clues? Thanks!

	-mi



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301101924.56353.mi%2Bmx>