On Thu, Jan 05, 2006 at 12:48:25PM +0100, Ruediger Pluem wrote: > But I remember myself that there had been casting issues in the past that > created compiler warnings especially with gcc 4. The patch below compiles > fine with my gcc 3.2.2 with -Wall. So if someone could give a comment > if > > f->ctx = (void *)(1) > > is fine it would be great.
André's trick of using invented unique pointers by doing: static char sentinel; (in global scope) f->ctx = &sentinel; is neater and avoids the casting mess. (pick a suitable variable name though :) joe
