From owner-freebsd-current Thu Jan 28 01:22:25 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA13962 for freebsd-current-outgoing; Thu, 28 Jan 1999 01:22:25 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA13955 for ; Thu, 28 Jan 1999 01:22:24 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.2/8.9.1) id BAA02697; Thu, 28 Jan 1999 01:21:04 -0800 (PST) (envelope-from dillon) Date: Thu, 28 Jan 1999 01:21:04 -0800 (PST) From: Matthew Dillon Message-Id: <199901280921.BAA02697@apollo.backplane.com> To: Brian Feldman Cc: John Birrell , Nate Williams , archie@whistle.com, wollman@khavrinen.lcs.mit.edu, current@FreeBSD.ORG Subject: Re: btokup() macro in sys/malloc.h References: 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); : :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 : 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