Xref: utzoo comp.unix.xenix:2570 comp.lang.c:11011
Path: utzoo!attcan!uunet!husc6!bloom-beacon!mit-eddie!uw-beaver!cornell!rochester!pt.cs.cmu.edu!cadre!pitt!amanue!oglvee!jr
From: jr@oglvee.UUCP (Jim Rosenberg)
Newsgroups: comp.unix.xenix,comp.lang.c
Subject: Re: lint on Altos 2000 is BROKE BROKE BROKE!
Summary: no, void doesn't get her to shut up
Message-ID: <259@oglvee.UUCP>
Date: 29 Jun 88 15:57:16 GMT
References: <256@oglvee.UUCP> <8173@brl-smoke.ARPA>
Reply-To: jr@.UUCP (Jim Rosenberg)
Organization: Oglevee Computer Systems, Connellsville, Pa
Lines: 48

In article <8173@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes:
>Assuming your C implementation supports void *, there SHOULD be a complaint.
>Try (char *)(void *)whatever if you really have to do this, or better yet
>don't use (char *) as a generic type.

Well, thanks for the reminder that (void *) is supposed to replace (char *) as
the generic pointer type, but that doesn't exonerate my lint, alas:

	return (char *) (void *) scroo;

still produces a message "illegal pointer combination".  In fact, it seems to
me that the (void *) cast was the first thing I thought of, and it made no
difference!  With apologies to guardians of net bandwidth, here's the exact
transcript of what she says using (void *) instead of (char *):

t2.c:
#include 

struct shmoo {
	int whoo;
	char noo;
};

extern struct shmoo *scroo;

void *foo()
{
	(void) fprintf(stderr, "I don't belive this!\n");
	return (void *) scroo;
}

Output of lint -u t2.c:
t2.c
==============
warning: illegal pointer combination
    (13)  	


==============
function argument ( number ) used inconsistently
    fprintf( arg 1 )   	llibc(259) :: t2.c(12)

I still don't capiche why lint is squawking about arg 1 to fprintf!
-- 
Jim Rosenberg                        pitt
Oglevee Computer Systems                 >--!amanue!oglvee!jr
151 Oglevee Lane                      cgh
Connellsville, PA 15425                                #include