Is there a way similar to FreePascal to suppress compiler warnings inline? I got this annoying "suspicious pointer assignment" warning, even though the pointer type is correct. It involves a gtk procedure call and according to the bindings it should be correct. The handle_ pointer can be of two types, either GtkWidget ptr or GtkStackSwitch ptr. Either way I get the warning:
Code: Select all
function TStackSwitcher.GetStack() as GtkWidget ptr
return gtk_stack_switcher_get_stack(GTK_STACK_SWITCHER(handle_)) ' SUSPICIOUS POINTER ASSIGNMENT
end function
sub TStackSwitcher.SetStack(byref widget as GtkWidget ptr)
gtk_stack_switcher_set_stack(GTK_STACK_SWITCHER(handle_), GTK_STACK(widget)) ' NO WARNING
end sub
Note that the warning only occurs with the get_stack procedure, not with the set_stack procedure. Going over the GTK3 bindings, I cannot find a difference.