From ea5896201242d6ae17d870ba55c1a30353921a67 Mon Sep 17 00:00:00 2001 From: riccardom Date: Sat, 18 Apr 2009 19:28:59 +0000 Subject: [PATCH] Use of macro that can be a nop inside a conditional should be protected by braces otherwise a kitten will get hurt! --- desmume/src/cheatSystem.cpp | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/desmume/src/cheatSystem.cpp b/desmume/src/cheatSystem.cpp index b8e66a7d7..bb8854fbb 100644 --- a/desmume/src/cheatSystem.cpp +++ b/desmume/src/cheatSystem.cpp @@ -236,7 +236,9 @@ static void cheats_ARparser(CHEATS_LIST cheat) else { if_flag++; - if (if_flag > 32) LOG("AR: error in 'if' expression (type %i)\n", type); + if (if_flag > 32) { + LOG("AR: error in 'if' expression (type %i)\n", type); + } } break; @@ -248,7 +250,9 @@ static void cheats_ARparser(CHEATS_LIST cheat) else { if_flag++; - if (if_flag > 32) LOG("AR: error in 'if' expression (type %i)\n", type); + if (if_flag > 32) { + LOG("AR: error in 'if' expression (type %i)\n", type); + } } break; @@ -260,7 +264,9 @@ static void cheats_ARparser(CHEATS_LIST cheat) else { if_flag++; - if (if_flag > 32) LOG("AR: error in 'if' expression (type %i)\n", type); + if (if_flag > 32) { + LOG("AR: error in 'if' expression (type %i)\n", type); + } } break; @@ -272,7 +278,9 @@ static void cheats_ARparser(CHEATS_LIST cheat) else { if_flag++; - if (if_flag > 32) LOG("AR: error in 'if' expression (type %i)\n", type); + if (if_flag > 32) { + LOG("AR: error in 'if' expression (type %i)\n", type); + } } break; @@ -284,7 +292,9 @@ static void cheats_ARparser(CHEATS_LIST cheat) else { if_flag++; - if (if_flag > 32) LOG("AR: error in 'if' expression (type %i)\n", type); + if (if_flag > 32) { + LOG("AR: error in 'if' expression (type %i)\n", type); + } } break; @@ -296,7 +306,9 @@ static void cheats_ARparser(CHEATS_LIST cheat) else { if_flag++; - if (if_flag > 32) LOG("AR: error in 'if' expression (type %i)\n", type); + if (if_flag > 32) { + LOG("AR: error in 'if' expression (type %i)\n", type); + } } break; @@ -308,7 +320,9 @@ static void cheats_ARparser(CHEATS_LIST cheat) else { if_flag++; - if (if_flag > 32) LOG("AR: error in 'if' expression (type %i)\n", type); + if (if_flag > 32) { + LOG("AR: error in 'if' expression (type %i)\n", type); + } } break; @@ -320,7 +334,9 @@ static void cheats_ARparser(CHEATS_LIST cheat) else { if_flag++; - if (if_flag > 32) LOG("AR: error in 'if' expression (type %i)\n", type); + if (if_flag > 32) { + LOG("AR: error in 'if' expression (type %i)\n", type); + } } break;