From owner-freebsd-current Thu Jan 28 02:03:42 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA20290 for freebsd-current-outgoing; Thu, 28 Jan 1999 02:03:42 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.26.10.9]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA20266 for ; Thu, 28 Jan 1999 02:03:22 -0800 (PST) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id VAA00218; Thu, 28 Jan 1999 21:03:12 +1100 Date: Thu, 28 Jan 1999 21:03:12 +1100 From: Bruce Evans Message-Id: <199901281003.VAA00218@godzilla.zeta.org.au> To: green@unixhelp.org, jb@cimlogic.com.au Subject: Re: btokup() macro in sys/malloc.h Cc: archie@whistle.com, current@FreeBSD.ORG, nate@mt.sri.com, wollman@khavrinen.lcs.mit.edu Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >In cases, -Wall is bogus anyway. Here's one: >foo.c:89: warning: char format, void arg (arg 2) > void *region; > printf("mem open failed: %s\n", region); Yes, it should say "warning: char * format, void * arg (arg 2)". >According to standards, a void pointer may be freely used instead of any >other type of pointer, both as an lvalue and to assign to the other pointer. There are no lvalues or assigns to another pointer here. The code does what you want (if `region' is a char * represented as a void *) only because void * has the same representation as char *. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message