From 614fb6ae0902c695bf2a6f7670c09b76605e904a Mon Sep 17 00:00:00 2001 From: jeiea Date: Tue, 29 Apr 2025 07:44:22 +0900 Subject: [PATCH] nv-filters: Fix warnings with Visual Studio 2022 17.14 Following error occurs with Visual Studio 2022 v17.14 Preview 4.0 and Windows 11 SDK 10.0.26100.0 nvidia-videofx-filter.c(133,9): error C2220: the following warning is treated as an error nvidia-videofx-filter.c(133,9): warning C5287: operands are different enum types 'nvvfx_fx_id' and 'nvvfx_filter_id'; use an explicit cast to silence this warning The warning is reasonable, so change mismatched enum type. (cherry picked from commit a1c6bae601b37951e0157905cf1a651b33206fef) --- plugins/nv-filters/nvidia-videofx-filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/nv-filters/nvidia-videofx-filter.c b/plugins/nv-filters/nvidia-videofx-filter.c index 615f9fa27..34e4d63b1 100644 --- a/plugins/nv-filters/nvidia-videofx-filter.c +++ b/plugins/nv-filters/nvidia-videofx-filter.c @@ -41,7 +41,7 @@ #define S_STRENGTH_DEFAULT 0.5 #define TEXT_MODE_BLUR_STRENGTH MT_("Nvvfx.Method.Blur.Strength") -enum nvvfx_filter_id { S_FX_AIGS, S_FX_BLUR, S_FX_BG_BLUR }; +enum nvvfx_fx_id { S_FX_AIGS, S_FX_BLUR, S_FX_BG_BLUR }; bool nvvfx_loaded = false; bool nvvfx_new_sdk = false; @@ -91,7 +91,7 @@ struct nvvfx_data { int processing_counter; /* blur specific */ - enum nvvfx_filter_id filter_id; + enum nvvfx_fx_id filter_id; NvVFX_Handle handle_blur; CUstream stream_blur; // cuda stream float strength; // from 0 to 1, default = 0.5