winedump: Remove dead code (Coverity) (resend)

Andrew Talbot Andrew.Talbot at talbotville.com
Sat Oct 21 15:06:55 CDT 2006


What is wrong with this patch (for CID-41), please? The relevant code section
is:

    if (effective_sig == SIG_UNKNOWN)
    {
	printf("Can't get a recognized file signature, aborting\n");
	ret = 0;
    }
    else if (wanted_sig == SIG_UNKNOWN || wanted_sig == effective_sig)
    {
	switch (effective_sig)
	{
	case SIG_UNKNOWN: /* shouldn't happen... */
	    ret = 0; break;

I thought being in the "else" of the outer "if" ruled out the possibility of
the "case SIG_UNKNOWN" being true.

Thanks,

-- Andy.
---
Changelog:
    winedump: Remove dead code (Coverity).

diff -urN a/tools/winedump/dump.c b/tools/winedump/dump.c
--- a/tools/winedump/dump.c	2006-08-24 11:57:28.000000000 +0100
+++ b/tools/winedump/dump.c	2006-10-14 12:59:13.000000000 +0100
@@ -257,8 +257,6 @@
     {
 	switch (effective_sig)
 	{
-	case SIG_UNKNOWN: /* shouldn't happen... */
-	    ret = 0; break;
 	case SIG_PE:
 	case SIG_NE:
 	case SIG_LE:



More information about the wine-patches mailing list