Fixed Xcode 14.2 warnings
parent
dc280c17a0
commit
237086c917
|
@ -478,11 +478,6 @@ static void SDLCALL SDL_LogOutput(void *userdata, int category, SDL_LogPriority
|
||||||
#if HAVE_STDIO_H && \
|
#if HAVE_STDIO_H && \
|
||||||
!(defined(__APPLE__) && (defined(SDL_VIDEO_DRIVER_COCOA) || defined(SDL_VIDEO_DRIVER_UIKIT)))
|
!(defined(__APPLE__) && (defined(SDL_VIDEO_DRIVER_COCOA) || defined(SDL_VIDEO_DRIVER_UIKIT)))
|
||||||
(void)fprintf(stderr, "%s: %s\n", SDL_priority_prefixes[priority], message);
|
(void)fprintf(stderr, "%s: %s\n", SDL_priority_prefixes[priority], message);
|
||||||
#else
|
|
||||||
/* We won't print anything, but reference the priority prefix anyway
|
|
||||||
to avoid a compiler warning.
|
|
||||||
*/
|
|
||||||
(void)SDL_priority_prefixes[priority];
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1214,7 +1214,7 @@ static int COREAUDIO_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int i
|
||||||
/* Some devices have whitespace at the end...trim it. */
|
/* Some devices have whitespace at the end...trim it. */
|
||||||
while ((len > 0) && (devname[len - 1] == ' ')) {
|
while ((len > 0) && (devname[len - 1] == ' ')) {
|
||||||
len--;
|
len--;
|
||||||
usable = len;
|
usable = (int)len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1517,7 +1517,7 @@ METAL_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect,
|
||||||
[mtltexture getBytes:temp_pixels bytesPerRow:temp_pitch fromRegion:mtlregion mipmapLevel:0];
|
[mtltexture getBytes:temp_pixels bytesPerRow:temp_pitch fromRegion:mtlregion mipmapLevel:0];
|
||||||
|
|
||||||
temp_format = (mtltexture.pixelFormat == MTLPixelFormatBGRA8Unorm) ? SDL_PIXELFORMAT_ARGB8888 : SDL_PIXELFORMAT_ABGR8888;
|
temp_format = (mtltexture.pixelFormat == MTLPixelFormatBGRA8Unorm) ? SDL_PIXELFORMAT_ARGB8888 : SDL_PIXELFORMAT_ABGR8888;
|
||||||
status = SDL_ConvertPixels(rect->w, rect->h, temp_format, temp_pixels, temp_pitch, pixel_format, pixels, pitch);
|
status = SDL_ConvertPixels(rect->w, rect->h, temp_format, temp_pixels, (int)temp_pitch, pixel_format, pixels, pitch);
|
||||||
SDL_free(temp_pixels);
|
SDL_free(temp_pixels);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue