Suspicious pointer conversion warning in Turbo C 2.0
Karl Heuer
karl at haddock.ima.isc.com
Fri Jul 27 10:31:42 AEST 1990
>> void AddLNode(void ** Hptr, void * Nptr);
>> Tlist *Head, *Walker;
>> AddLNode(&Head,Walker); /* This statement generates a warning */
>
>The warnings you are getting are from the first parameter. When I cast
>it to AddLNode((void **)&Head, Walker); I don't get any warnings.
It should be noted that, although it silences the warnings, the cast makes the
code incorrect. It will fail on (existing) implementations where `Tlist *'
and `void *' do not have the same internal format.
Karl W. Z. Heuer (karl at kelp.ima.isc.com or ima!kelp!karl), The Walking Lint
Followups to comp.lang.c only.
More information about the Comp.lang.c
mailing list