Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Feb 2002 22:37:37 -0800
From:      Peter Wemm <peter@wemm.org>
To:        "M. Warner Losh" <imp@village.org>
Cc:        current@FreeBSD.ORG
Subject:   Re: HEADS UP: cvs commit: src/sys/conf kern.pre.mk (fwd) 
Message-ID:  <20020226063737.ED3953BAD@overcee.wemm.org>
In-Reply-To: <20020225.215923.28857552.imp@village.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
"M. Warner Losh" wrote:
> In message: <20020226014624.8D6A03BAC@overcee.wemm.org>
>             Peter Wemm <peter@wemm.org> writes:
> : There are a couple of offending files in the kernel still, and some
> : drivers. The things people are most likely to run into are:  usb, inet6,
> : and some drivers (twe, asr etc).
> 
> I've fixed a few of the low hanging fruit, but I don't know how to get
> rid of warnings like:
> 
> const char *foo = "blah";
> char *baz = foo;
> 
> when I know they are safe.

char *baz = (char *)(uintptr_t)foo;

... will work, but isn't exactly pretty.  I vaguely recall being told that
it should be cast to void * first.. ie: 

char *baz = (char *)(uintptr_t)(const void *)foo;

> Warner
> 

Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
"All of this is for nothing if we don't go to the stars" - JMS/B5


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?20020226063737.ED3953BAD>