mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-05 15:03:43 +00:00
Fixed Visual Studio warning 4701
This commit is contained in:
parent
28d687aae0
commit
b078122c53
4 changed files with 6 additions and 10 deletions
|
@ -3680,6 +3680,8 @@ static int SDLCALL SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer,
|
||||||
s.y = uv0_[1] * texh;
|
s.y = uv0_[1] * texh;
|
||||||
s.w = uv1_[0] * texw - s.x;
|
s.w = uv1_[0] * texw - s.x;
|
||||||
s.h = uv1_[1] * texh - s.y;
|
s.h = uv1_[1] * texh - s.y;
|
||||||
|
} else {
|
||||||
|
s.x = s.y = s.w = s.h = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
d.x = xy0_[0];
|
d.x = xy0_[0];
|
||||||
|
|
|
@ -1050,7 +1050,7 @@ int SDL_strncmp(const char *str1, const char *str2, size_t maxlen)
|
||||||
#if defined(HAVE_STRNCMP)
|
#if defined(HAVE_STRNCMP)
|
||||||
return strncmp(str1, str2, maxlen);
|
return strncmp(str1, str2, maxlen);
|
||||||
#else
|
#else
|
||||||
int result;
|
int result = 0;
|
||||||
|
|
||||||
while (maxlen) {
|
while (maxlen) {
|
||||||
result = (int)(unsigned char)*str1 - (unsigned char)*str2;
|
result = (int)(unsigned char)*str1 - (unsigned char)*str2;
|
||||||
|
@ -1061,9 +1061,6 @@ int SDL_strncmp(const char *str1, const char *str2, size_t maxlen)
|
||||||
++str2;
|
++str2;
|
||||||
--maxlen;
|
--maxlen;
|
||||||
}
|
}
|
||||||
if (!maxlen) {
|
|
||||||
result = 0;
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
#endif /* HAVE_STRNCMP */
|
#endif /* HAVE_STRNCMP */
|
||||||
}
|
}
|
||||||
|
@ -1098,7 +1095,7 @@ int SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen)
|
||||||
#elif defined(HAVE__STRNICMP)
|
#elif defined(HAVE__STRNICMP)
|
||||||
return _strnicmp(str1, str2, maxlen);
|
return _strnicmp(str1, str2, maxlen);
|
||||||
#else
|
#else
|
||||||
int a, b, result;
|
int a, b, result = 0;
|
||||||
|
|
||||||
while (maxlen) {
|
while (maxlen) {
|
||||||
a = SDL_tolower((unsigned char)*str1);
|
a = SDL_tolower((unsigned char)*str1);
|
||||||
|
@ -1111,9 +1108,6 @@ int SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen)
|
||||||
++str2;
|
++str2;
|
||||||
--maxlen;
|
--maxlen;
|
||||||
}
|
}
|
||||||
if (maxlen == 0) {
|
|
||||||
result = 0;
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
#endif /* HAVE_STRNCASECMP */
|
#endif /* HAVE_STRNCASECMP */
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,7 +175,7 @@
|
||||||
Uint8 *src = from; \
|
Uint8 *src = from; \
|
||||||
Uint8 *dst = to; \
|
Uint8 *dst = to; \
|
||||||
for (i = 0; i < (int)(length); i++) { \
|
for (i = 0; i < (int)(length); i++) { \
|
||||||
Uint32 s, d; \
|
Uint32 s = 0, d = 0; \
|
||||||
unsigned rs, gs, bs, rd, gd, bd; \
|
unsigned rs, gs, bs, rd, gd, bd; \
|
||||||
switch (bpp) { \
|
switch (bpp) { \
|
||||||
case 2: \
|
case 2: \
|
||||||
|
|
|
@ -273,7 +273,7 @@ SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_,
|
||||||
VkDisplayKHR display;
|
VkDisplayKHR display;
|
||||||
VkDisplayPlanePropertiesKHR *displayPlaneProperties = NULL;
|
VkDisplayPlanePropertiesKHR *displayPlaneProperties = NULL;
|
||||||
VkExtent2D extent;
|
VkExtent2D extent;
|
||||||
VkDisplayPlaneCapabilitiesKHR planeCaps;
|
VkDisplayPlaneCapabilitiesKHR planeCaps = { 0 };
|
||||||
|
|
||||||
/* Get information about the physical displays */
|
/* Get information about the physical displays */
|
||||||
result = vkGetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, &displayPropertiesCount, NULL);
|
result = vkGetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, &displayPropertiesCount, NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue