Fix deprecation warnings for pointer conversion