From dd59f5ee90b6b05bd810596cfa3ad55c9b449776 Mon Sep 17 00:00:00 2001 From: Yuri Date: Mon, 8 May 2017 09:25:52 -0700 Subject: [PATCH] fix(macro): Fixed clang warning about USING_V4L Clang produced this warning: "macro expansion producing 'defined' has undefined behavior" --- src/video/cameradevice.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/video/cameradevice.cpp b/src/video/cameradevice.cpp index a186311f4..7b25feac0 100644 --- a/src/video/cameradevice.cpp +++ b/src/video/cameradevice.cpp @@ -28,7 +28,11 @@ extern "C" { #include "cameradevice.h" #include "src/persistence/settings.h" -#define USING_V4L defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) +#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) +#define USING_V4L 1 +#else +#define USING_V4L 0 +#endif #ifdef Q_OS_WIN #include "src/platform/camera/directshow.h"