Michael Stefaniuc : ntdll: Don' t produce unreachable code during conditional compilation. Found by Smatch.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jul 19 07:59:44 CDT 2007


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

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Wed Jul 18 22:21:49 2007 +0200

ntdll: Don't produce unreachable code during conditional compilation. Found by Smatch.

---

 dlls/ntdll/cdrom.c  |    3 ++-
 dlls/ntdll/serial.c |    6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dlls/ntdll/cdrom.c b/dlls/ntdll/cdrom.c
index e245aad..269c41f 100644
--- a/dlls/ntdll/cdrom.c
+++ b/dlls/ntdll/cdrom.c
@@ -1036,9 +1036,10 @@ static NTSTATUS CDROM_Verify(int dev, int fd)
         return STATUS_SUCCESS;
     else
         return STATUS_NO_MEDIA_IN_DEVICE;
-#endif
+#else
     FIXME("not implemented for non-linux\n");
     return STATUS_NOT_SUPPORTED;
+#endif
 }
 
 /******************************************************************
diff --git a/dlls/ntdll/serial.c b/dlls/ntdll/serial.c
index 4e8a445..6b2e764 100644
--- a/dlls/ntdll/serial.c
+++ b/dlls/ntdll/serial.c
@@ -493,9 +493,10 @@ static NTSTATUS set_baud_rate(int fd, const SERIAL_BAUD_RATE* sbr)
             port.c_cflag |= B38400;
         }
         break;
-#endif    /* Don't have linux/serial.h or lack TIOCSSERIAL */
+#else     /* Don't have linux/serial.h or lack TIOCSSERIAL */
         ERR("baudrate %d\n", sbr->BaudRate);
         return STATUS_NOT_SUPPORTED;
+#endif    /* Don't have linux/serial.h or lack TIOCSSERIAL */
     }
 #elif !defined(__EMX__)
     switch (sbr->BaudRate)
@@ -911,9 +912,10 @@ static NTSTATUS get_irq_info(int fd, serial_irq_info *irq_info)
     }
     TRACE("TIOCGICOUNT err %s\n", strerror(errno));
     return FILE_GetNtStatus();
-#endif
+#else
     memset(irq_info,0, sizeof(serial_irq_info));
     return STATUS_NOT_IMPLEMENTED;
+#endif
 }
 
 




More information about the wine-cvs mailing list