[patch][gui] warning patrol no 3 gtk-peer stuff

Andreas Tobler toa@pop.agri.ch
Sun Oct 24 14:06:00 GMT 2004


Thomas Fitzsimmons wrote:

       to worry about returning it.  */
>>-  (void) funcPtr((void *) funcArg);
>>+  (void) funcPtr((void *) (size_t)funcArg);
>>   /* Fall off the end and terminate the thread of control. */
>> }
> 
> 
> These size_t casts seem wrong.  Have you looked into using intptr_t?

They are not wrong, they are not correct. ;)

Like this ?

-  (void) funcPtr((void *) funcArg);
+  (void) funcPtr((void *) (intptr_t)funcArg);



>>+/* Union used for type punning. */
>>+union widget_union
>>+{
>>+  void **void_widget;
>>+  GtkWidget **widget;
>>+};
>>+
> 
> 
> This union should be moved to gtkpeer.h and ev_widget_union should be
> eliminated.

Done.


Thanks,
Andreas



More information about the Java-patches mailing list