Second parameter has to be pointer, not int, so use GINT_TO_POINTER().  If no warning appear it only is because that particular action happens to have value 0, which is OK-ish for a pointer.