git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Warning fix for gcc 4

From
PRPavel Roskin <proski@gnu.org>
Date
Aug 9, 2005, 20:54 UTC
Message-ID
<1123620880.24295.17.camel@dv>
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
Message 1 of 1 in “Warning fix for gcc 4”
  1. Warning fix for gcc 4Pavel Roskin, Aug 9, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.