From owner-freebsd-hackers Wed Sep 18 11:09:34 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA28316 for hackers-outgoing; Wed, 18 Sep 1996 11:09:34 -0700 (PDT) Received: from glacier.cold.org (glacier.sunrem.com [206.81.134.54]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id LAA28298 for ; Wed, 18 Sep 1996 11:09:32 -0700 (PDT) Received: (from brandon@localhost) by glacier.cold.org (8.7.5/8.7.3) id MAA07942; Wed, 18 Sep 1996 12:11:00 -0600 (MDT) Date: Wed, 18 Sep 1996 12:10:59 -0600 (MDT) From: Brandon Gillespie To: freebsd-hackers@freebsd.org Subject: machine/endian.h: network byte order macros Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Compiling with '-Wall -pedantic' when using these macros (i.e. ntohs) gives the warning: net.c: In function `get_server_socket': net.c:129: warning: ANSI C forbids braced-groups within expressions net.c: In function `io_event_wait': net.c:249: warning: ANSI C forbids braced-groups within expressions net.c: In function `non_blocking_connect': net.c:317: warning: ANSI C forbids braced-groups within expressions Although trivial, the problem can be fixed by just removing '(' ')' from the outside of the macro, leaving '{' '}' there. This likely causes a problem with how its used (as a function), which would then lead one to think perhaps it should just be a function? *shrug* -Brandon Gillespie