Git development
 help / color / mirror / Atom feed
From: mikukkon@miku.homelinux.net (Mika Kukkonen)
To: torvalds@osdl.org
Cc: git@vger.kernel.org
Subject: [PATCH] git: fix gcc4 warnings
Date: Sun, 3 Jul 2005 23:32:33 +0300	[thread overview]
Message-ID: <20050703203233.GA19220@miku.homelinux.net> (raw)

Here is a few trivial fixes to git about things that gcc4 complains about.

Signed-off-by: Mika Kukkonen <mikukkon@iki.fi>

diffstat:
 git/send-pack.c |    2 +-
 git/sha1_file.c |    4 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

Index: git/send-pack.c
===================================================================
--- git.orig/send-pack.c
+++ git/send-pack.c
@@ -93,7 +93,7 @@ static void rev_list(int fd, struct ref 
 	exec_rev_list(refs);
 }
 
-static int pack_objects(int fd, struct ref *refs)
+static void pack_objects(int fd, struct ref *refs)
 {
 	pid_t rev_list_pid;
 
Index: git/sha1_file.c
===================================================================
--- git.orig/sha1_file.c
+++ git/sha1_file.c
@@ -384,8 +384,8 @@ struct packed_git *add_packed_git(char *
 {
 	struct stat st;
 	struct packed_git *p;
-	unsigned long idx_size;
-	void *idx_map;
+	unsigned long idx_size = 0;
+	void *idx_map = NULL;

 	if (check_packed_git_idx(path, &idx_size, &idx_map))
 		return NULL;
@@ -857,7 +857,7 @@ static void *unpack_non_delta_entry(unsi
 {
 	int st;
 	z_stream stream;
-	char *buffer;
+	unsigned char *buffer;
 
 	buffer = xmalloc(size + 1);
 	buffer[size] = 0;
@@ -949,7 +949,7 @@ int nth_packed_object_sha1(const struct 
 int find_pack_entry_one(const unsigned char *sha1,
 			struct pack_entry *e, struct packed_git *p)
 {
-	int *level1_ofs = p->index_base;
+	unsigned int *level1_ofs = p->index_base;
 	int hi = ntohl(level1_ofs[*sha1]);
 	int lo = ((*sha1 == 0x0) ? 0 : ntohl(level1_ofs[*sha1 - 1]));
 	void *index = p->index_base + 256;

                 reply	other threads:[~2005-07-03 20:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050703203233.GA19220@miku.homelinux.net \
    --to=mikukkon@miku.homelinux.net \
    --cc=git@vger.kernel.org \
    --cc=mikukkon@iki.fi \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox