Date: Thu, 28 Jan 1999 01:21:04 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Brian Feldman <green@unixhelp.org> Cc: John Birrell <jb@cimlogic.com.au>, Nate Williams <nate@mt.sri.com>, archie@whistle.com, wollman@khavrinen.lcs.mit.edu, current@FreeBSD.ORG Subject: Re: btokup() macro in sys/malloc.h Message-ID: <199901280921.BAA02697@apollo.backplane.com> References: <Pine.BSF.4.05.9901280334400.28225-100000@janus.syracuse.net>
next in thread | previous in thread | raw e-mail | index | archive | help
: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);
:
: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.
:Printf(), hence, wouldn't see a difference (of course). Gcc should not
:complain about various void pointer things like this.
I think that's an appropriate warning... if you want to treat 'region'
as a char *, you have to cast it to one. The standards do not cover
GCC's automatic var-args checking for printf() and related routines
anyway. I consider them 'weird' cases myself... not really standard,
but helpful.
-Matt
Matthew Dillon
<dillon@backplane.com>
: Brian Feldman _ __ ___ ___ ___
: green@unixhelp.org _ __ ___ | _ ) __| \
: http://www.freebsd.org/ _ __ ___ ____ | _ \__ \ |) |
: FreeBSD: The Power to Serve! _ __ ___ ____ _____ |___/___/___/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901280921.BAA02697>
