Remove unreachable statements
authorGuido Ostkamp <git@ostkamp.fastmail.fm>
Thu, 15 Nov 2007 22:19:11 +0000 (23:19 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 16 Nov 2007 05:23:47 +0000 (21:23 -0800)
Solaris Workshop Compiler found a few unreachable statements.

Signed-off-by: Guido Ostkamp <git@ostkamp.fastmail.fm>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-apply.c
utf8.c
xdiff/xdiffi.c
xdiff/xutils.c

index 8edcc08b61e6ab41098154afe1f6741f987978d7..91f8752ff7fdb588e64f594519a2e9503c516630 100644 (file)
@@ -683,7 +683,6 @@ static char *git_header_name(char *line, int llen)
                        }
                }
        }
-       return NULL;
 }
 
 /* Verify that we recognize the lines following a git header */
diff --git a/utf8.c b/utf8.c
index 8095a71d390e59e1ede1d3ed06921b2fcd50e753..9efcdb9c09970127ebe37923879274b95efd526c 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -284,7 +284,6 @@ int print_wrapped_text(const char *text, int indent, int indent2, int width)
                        text++;
                }
        }
-       return w;
 }
 
 int is_encoding_utf8(const char *name)
index 5cb7171a8f528881c6171defa5b102e87d7aa522..1bad8462fb32cffdc9ff20a278d513e7a444b257 100644 (file)
@@ -257,8 +257,6 @@ static long xdl_split(unsigned long const *ha1, long off1, long lim1,
                        return ec;
                }
        }
-
-       return -1;
 }
 
 
index 2ade97b2574a9f77e7ae4002a4e07a6a38e46d07..d7974d1a3e612a235b0c8adfde08ba802e782b5a 100644 (file)
@@ -232,8 +232,6 @@ int xdl_recmatch(const char *l1, long s1, const char *l2, long s2, long flags)
                return i1 >= s1 && i2 >= s2;
        } else
                return s1 == s2 && !memcmp(l1, l2, s1);
-
-       return 0;
 }
 
 static unsigned long xdl_hash_record_with_whitespace(char const **data,