ソースを参照

Fixed an error with goto crossing variable initialization

Sam Lantinga 2 ヶ月 前
コミット
762f4abbd0
1 ファイル変更1 行追加1 行削除
  1. 1 1
      test/testffmpeg_vulkan.c

+ 1 - 1
test/testffmpeg_vulkan.c

@@ -1079,7 +1079,7 @@ static SDL_Texture *CreateVulkanVideoTexturePixFmtDRMPrime(VulkanVideoContext *c
     import_fd_info.handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT;
     import_fd_info.handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT;
     import_fd_info.fd = dma_buf_fds[0];
     import_fd_info.fd = dma_buf_fds[0];
 
 
-    uint32_t memoryTypeIndex = 0;
+    uint32_t memoryTypeIndex;
     if (!FindMemoryIndex(context, mem_reqs.memoryTypeBits, &memoryTypeIndex)) {
     if (!FindMemoryIndex(context, mem_reqs.memoryTypeBits, &memoryTypeIndex)) {
         goto error;
         goto error;
     }
     }