Suspicious pointer conversion warning in Turbo C 2.0

Don_A_Corbitt at cup.portal.com Don_A_Corbitt at cup.portal.com
Fri Jul 27 03:34:52 AEST 1990


 > pointers. The code fragment below generates a warning message when I pass a
 > pointer to a structure. The parameter bitched about is the second pointer.

> void AddLNode(void ** Hptr, void * Nptr);
> void * DelLNode(void ** , void * );
> main()
> {
	> Tlist *Head, *Walker;
	> AddLNode(&Head,Walker);	/* This statement generates a warning */
> }
> {apple|pyramid|sun}!octopus!stever} Disclaimer: I speak only for me! 8-)
> Flames, grammar errors, spelling errrors >/dev/nul

1) 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.  Chris Torek
gave you the correct answer.  What made you think the warnings were from the
second parameter?

2) Cross posting to alt.msdos.programmer, comp.lang.c, comp.os.msdos.programmer
usually means too many people are going to see the question and answer.  I'm
leaving the groups, but I suggest followups (if any) by mail.
---
Don_A_Corbitt at cup.portal.com      Not a spokesperson for CrystalGraphics, Inc.
Mail flames, post apologies.       Support short .signatures, three lines max.



More information about the Comp.lang.c mailing list