# [PATCH] Warning fix for gcc 4

1 messages from 2005-08-09 to 2005-08-09. Participants: Pavel Roskin.
Thread: https://gitlist.dev/t/1464

## Pavel Roskin, 2005-08-09 20:54

Subject: [PATCH] Warning fix for gcc 4
Message-ID: <1123620880.24295.17.camel@dv>
URL: https://gitlist.dev/e/1123620880.24295.17.camel%40dv

```
Hello!

This patch fixes the only warning reported by gcc 4.0.1 on Fedora Core 4
for x86_64:

sha1_file.c:1391: warning: pointer targets in assignment differ in
signedness

Signed-off-by: Pavel Roskin <proski@gnu.org>

diff --git a/sha1_file.c b/sha1_file.c
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1388,7 +1388,7 @@ int write_sha1_from_fd(const unsigned ch
 		ssize_t size;
 		if (*bufposn) {
 			stream.avail_in = *bufposn;
-			stream.next_in = buffer;
+			stream.next_in = (unsigned char *) buffer;
 			do {
 				stream.next_out = discard;
 				stream.avail_out = sizeof(discard);


-- 
Regards,
Pavel Roskin

```
