Use XtArgVal (usually (long)) to convert (XtPointer) to (int) and back. This provides safe way to convert and avoids compiler warning.