git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix Solaris compiler warnings
@ 2007-11-15 22:19 Guido Ostkamp
  2007-11-15 23:00 ` Alex Riesen
  0 siblings, 1 reply; 10+ messages in thread
From: Guido Ostkamp @ 2007-11-15 22:19 UTC (permalink / raw)
  To: git

Hello,

the below patch fixes some compiler warnings returned by Solaris Workshop 
Compilers.

     CC builtin-apply.o
"builtin-apply.c", line 686: warning: statement not reached
     CC utf8.o
"utf8.c", line 287: warning: statement not reached
     CC xdiff/xdiffi.o
"xdiff/xdiffi.c", line 261: warning: statement not reached
     CC xdiff/xutils.o
"xdiff/xutils.c", line 236: warning: statement not reached

Signed-off-by: Guido Ostkamp <git@ostkamp.fastmail.fm>
---
  builtin-apply.c |    1 -
  utf8.c          |    1 -
  xdiff/xdiffi.c  |    2 --
  xdiff/xutils.c  |    2 --
  4 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/builtin-apply.c b/builtin-apply.c
index 8edcc08..91f8752 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -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 8095a71..9efcdb9 100644
--- 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)
diff --git a/xdiff/xdiffi.c b/xdiff/xdiffi.c
index 5cb7171..1bad846 100644
--- a/xdiff/xdiffi.c
+++ b/xdiff/xdiffi.c
@@ -257,8 +257,6 @@ static long xdl_split(unsigned long const *ha1, long off1, long lim1,
  			return ec;
  		}
  	}
-
-	return -1;
  }


diff --git a/xdiff/xutils.c b/xdiff/xutils.c
index 2ade97b..d7974d1 100644
--- a/xdiff/xutils.c
+++ b/xdiff/xutils.c
@@ -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,
-- 
1.5.3.5.721.g039b

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-11-17 14:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-15 22:19 [PATCH] Fix Solaris compiler warnings Guido Ostkamp
2007-11-15 23:00 ` Alex Riesen
2007-11-15 23:16   ` Junio C Hamano
2007-11-16  7:48     ` Alex Riesen
2007-11-16  9:14       ` Junio C Hamano
2007-11-16 22:52       ` Guido Ostkamp
2007-11-17  9:46         ` [PATCH] Rewrite some function exit paths to avoid "unreachable code" traps Alex Riesen
2007-11-17 10:39           ` Robin Rosenberg
2007-11-17 12:23             ` Alex Riesen
2007-11-17 14:31               ` Robin Rosenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).