tests: Fix unreachable code warnings (#14993)

This commit is contained in:
RaceTheMaSe
2026-02-07 18:42:59 +01:00
committed by GitHub
parent 863912aa03
commit 7c7ffb9115
7 changed files with 21 additions and 22 deletions

View File

@@ -55,7 +55,7 @@ static bool SDL_OPENXR_INTERNAL_ValidationLayerAvailable(void)
/* On Android/Quest, the xrGetInstanceProcAddr obtained through runtime negotiation
* crashes when used for pre-instance global functions. Skip validation layer check. */
return false;
#endif
#else
Uint32 apiLayerCount;
if (XR_FAILED(xrEnumerateApiLayerProperties(0, &apiLayerCount, NULL))) {
@@ -84,6 +84,7 @@ static bool SDL_OPENXR_INTERNAL_ValidationLayerAvailable(void)
SDL_stack_free(apiLayerProperties);
return found;
#endif
}
XrResult SDL_OPENXR_INTERNAL_GPUInitOpenXR(

View File

@@ -2795,7 +2795,6 @@ static bool D3D12_SetDrawState(SDL_Renderer *renderer, const SDL_RenderCommand *
break;
default:
return SDL_SetError("[direct3d12] Trying to set a sampler for a shader which doesn't have one");
break;
}
ID3D12GraphicsCommandList2_SetGraphicsRootDescriptorTable(rendererData->commandList, tableIndex, GPUHandle);

View File

@@ -2230,7 +2230,7 @@ LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
SDL_SendDropComplete(data->window);
DragFinish(drop);
return 0;
} break;
}
case WM_DISPLAYCHANGE:
{
@@ -2462,7 +2462,6 @@ LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
data->expected_resize = false;
return 0;
}
break;
case WM_SETTINGCHANGE:
if (wParam == 0 && lParam != 0 && SDL_wcscmp((wchar_t *)lParam, L"ImmersiveColorSet") == 0) {