#83 panel structure member userptr is incorrectly const

open
nobody
None
5
2012-04-05
2012-04-05
John P. Hartmann
No

While it is true that the panel code itself does not modify the user pointer, it does not follow that whoever extracts it with panel_userptr() also treats it as constant. At the moment one is forced to cast the user pointer, though a direct assignment to the relevant pointer type is valid C.

That is:

struct mystr * ms = panel_userrptr(p)

attracts an incorrect warning for const being discarded.

Discussion