=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: msi/tests: Make multiline macros blocks (coverity).

Alexandre Julliard julliard at winehq.org
Wed Oct 24 13:39:41 CDT 2012


Module: wine
Branch: master
Commit: 1e361aa8cb9b6f0030fd1b24e2a0b07c7de24b5e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1e361aa8cb9b6f0030fd1b24e2a0b07c7de24b5e

Author: André Hentschel <nerv at dawncrow.de>
Date:   Wed Oct 24 02:05:15 2012 +0200

msi/tests: Make multiline macros blocks (coverity).

---

 dlls/msi/tests/action.c |   30 ++++++++++++++++++++----------
 1 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index 1fcb82d..0a825cd 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/action.c
@@ -2610,36 +2610,46 @@ static void check_reg_dword5(HKEY prodkey, LPCSTR name, DWORD expected1, DWORD e
     check_reg_str(prodkey, name, expected, TRUE, __LINE__);
 
 #define CHECK_DEL_REG_STR(prodkey, name, expected) \
-    check_reg_str(prodkey, name, expected, TRUE, __LINE__); \
-    RegDeleteValueA(prodkey, name);
+    do { \
+        check_reg_str(prodkey, name, expected, TRUE, __LINE__); \
+        RegDeleteValueA(prodkey, name); \
+    } while(0)
 
 #define CHECK_REG_ISTR(prodkey, name, expected) \
     check_reg_str(prodkey, name, expected, FALSE, __LINE__);
 
 #define CHECK_DEL_REG_ISTR(prodkey, name, expected) \
-    check_reg_str(prodkey, name, expected, FALSE, __LINE__); \
-    RegDeleteValueA(prodkey, name);
+    do { \
+        check_reg_str(prodkey, name, expected, FALSE, __LINE__); \
+        RegDeleteValueA(prodkey, name); \
+    } while(0)
 
 #define CHECK_REG_DWORD(prodkey, name, expected) \
     check_reg_dword(prodkey, name, expected, __LINE__);
 
 #define CHECK_DEL_REG_DWORD(prodkey, name, expected) \
-    check_reg_dword(prodkey, name, expected, __LINE__); \
-    RegDeleteValueA(prodkey, name);
+    do { \
+        check_reg_dword(prodkey, name, expected, __LINE__); \
+        RegDeleteValueA(prodkey, name); \
+    } while(0)
 
 #define CHECK_REG_DWORD2(prodkey, name, expected1, expected2) \
     check_reg_dword2(prodkey, name, expected1, expected2, __LINE__);
 
 #define CHECK_DEL_REG_DWORD2(prodkey, name, expected1, expected2) \
-    check_reg_dword2(prodkey, name, expected1, expected2, __LINE__); \
-    RegDeleteValueA(prodkey, name);
+    do { \
+        check_reg_dword2(prodkey, name, expected1, expected2, __LINE__); \
+        RegDeleteValueA(prodkey, name); \
+    } while(0)
 
 #define CHECK_REG_DWORD4(prodkey, name, expected1, expected2, expected3, expected4) \
     check_reg_dword4(prodkey, name, expected1, expected2, expected3, expected4, __LINE__);
 
 #define CHECK_DEL_REG_DWORD5(prodkey, name, expected1, expected2, expected3, expected4 ,expected5) \
-    check_reg_dword5(prodkey, name, expected1, expected2, expected3, expected4, expected5, __LINE__); \
-    RegDeleteValueA(prodkey, name);
+    do { \
+        check_reg_dword5(prodkey, name, expected1, expected2, expected3, expected4, expected5, __LINE__); \
+        RegDeleteValueA(prodkey, name); \
+    } while(0)
 
 static void get_date_str(LPSTR date)
 {




More information about the wine-cvs mailing list