Lint Confusion? - (nf)

mwm at ea.UUCP mwm at ea.UUCP
Tue Jul 24 11:57:00 AEST 1984


#N:ea:13400009:000:596
ea!mwm    Jul 23 20:57:00 1984

While delinting a PD program I had gotten a copy of, I ran into a problem
that indicates that either lint or I are confused.

The decleration is:	struct node *(*map)[];
and (of course):	char *calloc();

The line lint complains about is:
    if ((map = (struct node *(*)[]) calloc(1,sizeof(struct node *) * KMSIZE))

Lint says:
xlkmap.c(48): warning: illegal pointer combination
xlkmap.c(49): warning: possible pointer alignment problem

Is lint objecting to coercing a pointer to glop {*(*)[]}, or is it confused,
or am I confused? Second, is there any reasonable way to get rid of this?

	<mike



More information about the Comp.unix mailing list