lint on Altos 2000 is BROKE BROKE BROKE!

Jim Rosenberg jr at oglvee.UUCP
Thu Jun 30 01:57:16 AEST 1988


In article <8173 at brl-smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) 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 <stdio.h>

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 <disclaimer.h>



More information about the Comp.lang.c mailing list