On 2/21/2012 4:03 PM, Daniel Shahaf wrote: > Stefan Fritsch wrote on Tue, Feb 21, 2012 at 22:53:44 +0100: >> On Tuesday 21 February 2012, Michael Felt wrote: >>> FYI - I see no notable difference in the W messages with the IBM >>> vacpp (xlc) v7 compiler using no CFLAGS and CFLAGS='-O2 >>> -qlanglvl=extc99' >> >> Hrm. Assigning function pointers to void * is not really portable. Not >> sure about the best way to fix this, yet, while keeping the code >> readable. >> > > I think the issue is a constness mismatch?
No... a function pointer isn't a data pointers (and there are several architectures which reflect this). It's also a potential source of security weaknesses. Is the function prototype variable? Or cast it through a typedef void (void_fn*)(void); void_fn fnp; variable, which at least retains the 'functionness' of the pointer.