Fixed build warnings

This commit is contained in:
Sam Lantinga
2024-09-02 16:53:30 -07:00
parent f11e7cd06f
commit 35dadda327
5 changed files with 28 additions and 21 deletions

View File

@@ -1514,7 +1514,7 @@ static void VULKAN_INTERNAL_NewMemoryFreeRegion(
}
// perform insertion sort
if (allocation->allocator->sortedFreeRegionCount > 0 && insertionIndex != allocation->allocator->sortedFreeRegionCount) {
if (allocation->allocator->sortedFreeRegionCount > 0 && (Uint32)insertionIndex != allocation->allocator->sortedFreeRegionCount) {
for (Sint32 i = allocation->allocator->sortedFreeRegionCount; i > insertionIndex && i > 0; i -= 1) {
allocation->allocator->sortedFreeRegions[i] = allocation->allocator->sortedFreeRegions[i - 1];
allocation->allocator->sortedFreeRegions[i]->sortedIndex = i;
@@ -1955,7 +1955,7 @@ static Uint8 VULKAN_INTERNAL_BindResourceMemory(
VulkanMemoryUsedRegion *usedRegion;
VkDeviceSize requiredSize, allocationSize;
VkDeviceSize alignedOffset;
VkDeviceSize alignedOffset = 0;
VkDeviceSize newRegionSize, newRegionOffset;
Uint8 isHostVisible, smallAllocation, allocationResult;
Sint32 i;
@@ -11272,7 +11272,8 @@ static Uint8 VULKAN_INTERNAL_DeterminePhysicalDevice(VulkanRenderer *renderer)
VkResult vulkanResult;
VkPhysicalDevice *physicalDevices;
VulkanExtensions *physicalDeviceExtensions;
Uint32 physicalDeviceCount, i, suitableIndex;
Uint32 i, physicalDeviceCount;
Sint32 suitableIndex;
Uint32 queueFamilyIndex, suitableQueueFamilyIndex;
Uint8 deviceRank, highestRank;