SMATCH: remove some unreachable code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

this was found with smatch's new unreached_code.pl script.
dlls/comctl32/rebar.c
    code after if-else construct with return statement in both branches
dlls/winedos/vga.c
    code after break in switch statement
dlls/wininet/internet.c
dlls/winsock/socket.c
    code after switch statement in which every branch has a return
    statement

License: LGPL, X11
Changelog:
	Michael Stefaniuc <mstefani@redhat.com>
	- remove some unreachable code

bye
	michael
-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
System Administration           Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani@redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart
Index: dlls/comctl32/rebar.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/rebar.c,v
retrieving revision 1.70
diff -u -r1.70 rebar.c
--- dlls/comctl32/rebar.c	8 Jan 2003 21:09:28 -0000	1.70
+++ dlls/comctl32/rebar.c	22 Feb 2003 17:19:40 -0000
@@ -2273,9 +2273,6 @@
 	TRACE("NOWHERE\n");
 	return;
     }
-
-    TRACE("flags=0x%X\n", *pFlags);
-    return;
 }
 
 
Index: dlls/winedos/vga.c
===================================================================
RCS file: /home/wine/wine/dlls/winedos/vga.c,v
retrieving revision 1.32
diff -u -r1.32 vga.c
--- dlls/winedos/vga.c	19 Feb 2003 23:27:01 -0000	1.32
+++ dlls/winedos/vga.c	22 Feb 2003 17:19:40 -0000
@@ -971,10 +971,6 @@
                         vga_index_3c4, val);
            }
            break;
-
-           FIXME("Unsupported index, register 0x3c4: 0x%02x (value 0x%02x)\n",
-                 vga_index_3c4, val);
-           break;
         case 0x3c8:
             palreg=val; palcnt=0; break;
         case 0x3c9:
Index: dlls/wininet/internet.c
===================================================================
RCS file: /home/wine/wine/dlls/wininet/internet.c,v
retrieving revision 1.50
diff -u -r1.50 internet.c
--- dlls/wininet/internet.c	28 Jan 2003 00:17:15 -0000	1.50
+++ dlls/wininet/internet.c	22 Feb 2003 17:19:41 -0000
@@ -1720,7 +1720,6 @@
     client = InternetConnectA(hInternet, hostName, urlComponents.nPort,
         userName, password, INTERNET_SERVICE_FTP, dwFlags, dwContext);
     return FtpOpenFileA(client, path, GENERIC_READ, dwFlags, dwContext);
-    break;
   case INTERNET_SCHEME_HTTP:
   case INTERNET_SCHEME_HTTPS:
   {
@@ -1750,7 +1749,6 @@
       return NULL;
     }
     return client1;
-    break;
   }
   case INTERNET_SCHEME_GOPHER:
     /* gopher doesn't seem to be implemented in wine, but it's supposed
@@ -1758,8 +1756,6 @@
   default:
     return NULL;
   }
-  if(client != NULL)
-    InternetCloseHandle(client);
 }
 
 
Index: dlls/winsock/socket.c
===================================================================
RCS file: /home/wine/wine/dlls/winsock/socket.c,v
retrieving revision 1.119
diff -u -r1.119 socket.c
--- dlls/winsock/socket.c	28 Jan 2003 01:07:09 -0000	1.119
+++ dlls/winsock/socket.c	22 Feb 2003 17:19:42 -0000
@@ -4181,9 +4181,6 @@
                        SetLastError(WSAENOTSOCK);
                        return SOCKET_ERROR;
                }
-
-       SetLastError(WSAENOTSOCK);
-       return SOCKET_ERROR;
 }
 
 /***********************************************************************

Attachment: pgp00107.pgp
Description: PGP signature


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux