From e9d01fd7ce942782c53ea42074389c8db080a6ab Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 9 Jan 2026 10:53:00 +0100 Subject: [PATCH] vcap/dshow: fix gcc warn suggested braces around empty body --- src/video_capture/DirectShowGrabber.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/video_capture/DirectShowGrabber.cpp b/src/video_capture/DirectShowGrabber.cpp index 47d694dc0..62da96478 100644 --- a/src/video_capture/DirectShowGrabber.cpp +++ b/src/video_capture/DirectShowGrabber.cpp @@ -222,11 +222,12 @@ static bool cleanup(struct vidcap_dshow_state *s) { } #define HANDLE_ERR_ACTION(res, action, msg, ...) \ - if (res != S_OK) { \ + do {\ + if (res == S_OK) break;\ MSG(ERROR, msg ": %s\n", \ __VA_ARGS__ __VA_OPT__(, ) hresult_to_str(res)); \ action; \ - } else + } while(0) static bool common_init(struct vidcap_dshow_state *s) { #define HANDLE_ERR(msg, ...) \