[PATCH 8/10] Fix some minor warnings to allow -Werror.

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

 



Signed-off-by: Ramsay Allan Jones <ramsay@xxxxxxxxxxxxxxxxxxx>
---
 builtin-mailinfo.c |    3 ++-
 diff.c             |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index 3e40747..bb5e7b7 100644
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
@@ -531,7 +531,8 @@ static int decode_b_segment(char *in, ch
 static void convert_to_utf8(char *line, char *charset)
 {
 #ifndef NO_ICONV
-	char *in, *out;
+	const char *in;
+	char *out;
 	size_t insize, outsize, nrc;
 	char outbuf[4096]; /* cheat */
 	static char latin_one[] = "latin1";
diff --git a/diff.c b/diff.c
index 5a71489..81630c0 100644
--- a/diff.c
+++ b/diff.c
@@ -614,6 +614,7 @@ static void emit_binary_diff(mmfile_t *o
 	 * whichever is smaller.
 	 */
 	delta = NULL;
+	orig_size = 0;
 	deflated = deflate_it(two->ptr, two->size, &deflate_size);
 	if (one->size && two->size) {
 		delta = diff_delta(one->ptr, one->size,
-- 
1.4.1
From 262b57917ff01f74c95670ae59f1cd59a9024135 Mon Sep 17 00:00:00 2001
From: Ramsay Allan Jones <ramsay@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 30 Jul 2006 17:06:25 +0100
Subject: [PATCH 8/10] Fix some minor warnings to allow -Werror.

Signed-off-by: Ramsay Allan Jones <ramsay@xxxxxxxxxxxxxxxxxxx>
---
 builtin-mailinfo.c |    3 ++-
 diff.c             |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index 3e40747..bb5e7b7 100644
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
@@ -531,7 +531,8 @@ static int decode_b_segment(char *in, ch
 static void convert_to_utf8(char *line, char *charset)
 {
 #ifndef NO_ICONV
-	char *in, *out;
+	const char *in;
+	char *out;
 	size_t insize, outsize, nrc;
 	char outbuf[4096]; /* cheat */
 	static char latin_one[] = "latin1";
diff --git a/diff.c b/diff.c
index 5a71489..81630c0 100644
--- a/diff.c
+++ b/diff.c
@@ -614,6 +614,7 @@ static void emit_binary_diff(mmfile_t *o
 	 * whichever is smaller.
 	 */
 	delta = NULL;
+	orig_size = 0;
 	deflated = deflate_it(two->ptr, two->size, &deflate_size);
 	if (one->size && two->size) {
 		delta = diff_delta(one->ptr, one->size,
-- 
1.4.1


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]