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

Michael Stefaniuc mstefani at redhat.de
Wed Jul 18 15:21:49 CDT 2007


---
 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
 }
 
 
-- 
1.5.2.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070718/6daca44f/attachment.pgp


More information about the wine-patches mailing list