Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!umd5!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Help me cast this! Message-ID: <7822@brl-smoke.ARPA> Date: 3 May 88 14:06:18 GMT References: <294@fedeva.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 8 In article <294@fedeva.UUCP> wrd3156@fedeva.UUCP (Bill Daniels) writes: >How do I cast the malloc() in line 12 of the following program to avoid >the lint cries of "warning: illegal pointer combination" et al? General, SVR2 "lint" will complain about casting the (char *) returned by malloc() into other pointer types, and there seems to be no way around it. The best you can do is obtain a "possible pointer alignment problem" warning. That's because "lint" does not know that the pointer returned by malloc() is guaranteed to point to properly aligned storage for any use.