Message ID | CAB0OVGpoZs9+2FsGzdGa7ehDATmSeBLxL3ryLzj=mjraDWoN5Q@mail.gmail.com |
---|---|
State | Rejected |
Headers | show |
Carl Eugen Hoyos (2018-12-17): > #ifndef emms_c > -# define emms_c() while(0) > +# define emms_c() while(0){} > #endif That feels really wrong, or at least completely unusual. But not the change you made, the original code: the usual statement is: "do { statement } while (0)" And if you make that change, you will get a warning about a semicolon after a braced block. I suggest to change the definition to #define emms_c() do { } while (0) Regards,
From 67f692d81792920f5344ceba239f64b2b9b4bec1 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <ceffmpeg@gmail.com> Date: Mon, 17 Dec 2018 14:28:35 +0100 Subject: [PATCH] lavu/internal: Add an empty body to "while(0)". Fixes a clang warning if arch != x86: libswscale/utils.c:345:13: warning: while loop has empty body --- libavutil/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/internal.h b/libavutil/internal.h index 06bd561..2a6e502 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -52,7 +52,7 @@ #endif #ifndef emms_c -# define emms_c() while(0) +# define emms_c() while(0){} #endif #ifndef attribute_align_arg -- 1.7.10.4