Wine: Use { } instead of ; for an empty basic block.

Gerald Pfeifer gerald at pfeifer.com
Sat Apr 16 18:23:32 CDT 2011


Just having ; as a basic block is tricky and can lead to mistakes (by
being overlooked) and GCC therefor added a warning, -Wempty-body.  This
is the only case this warning currently triggers for me.

Gerald
---
 dlls/krnl386.exe16/instr.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/krnl386.exe16/instr.c b/dlls/krnl386.exe16/instr.c
index 61f92ab..5db0b2b 100644
--- a/dlls/krnl386.exe16/instr.c
+++ b/dlls/krnl386.exe16/instr.c
@@ -632,11 +632,13 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
 	      int seg = outp ? context->SegDs : context->SegEs;  /* FIXME: is this right? */
 
 	      if (outp)
+              {
 		/* FIXME: Check segment is readable.  */
-		;
+              }
 	      else
+              {
 		/* FIXME: Check segment is writable.  */
-		;
+              }
 
 	      if (repX)
               {
-- 
1.7.4.1



More information about the wine-patches mailing list