Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!floyd!harpo!seismo!hao!hplabs!sri-unix!gwyn@Brl-Vld.ARPA From: gwyn@Brl-Vld.ARPA Newsgroups: net.unix-wizards Subject: Re: casts Message-ID: <236@sri-arpa.UUCP> Date: Fri, 23-Mar-84 13:41:37 EST Article-I.D.: sri-arpa.236 Posted: Fri Mar 23 13:41:37 1984 Date-Received: Sun, 1-Apr-84 07:21:51 EST Lines: 14 From: Doug Gwyn (VLD/VMB) Don't worry; your use of casts on malloc()ed pointers is fine. The warnings would be valid if it were not for the fact that malloc() is carefully designed to return pointers to storage that is aligned stringently enough that the (char *) can be safely cast to (anything *). "lint" does not know how malloc() was designed so it warns about coercing (char *) to (anything *) and back since that is IN GENERAL unsafe. It happens not to be a problem in this case, so ignore the warnings. The C Language Standards Committee was talking about adding (void *) to the language as a generic pointer type. Perhaps that will eventually help...