Package: simulavr
Version: 0.1.2.1-3
Severity: normal
Tags: patch
When building 'simulavr' on amd64/unstable with gcc-4.0,
I get the following error:
cc1: warnings being treated as errors
gdbserver.c: In function 'gdb_read_memory':
gdbserver.c:613: warning: pointer targets in passing argument 1 of 'snprintf'
differ in signedness
gdbserver.c:681: warning: pointer targets in passing argument 1 of 'snprintf'
differ in signedness
gdbserver.c:684: warning: pointer targets in passing argument 2 of
'gdb_send_reply' differ in signedness
make[4]: *** [gdbserver.o] Error 1
make[4]: Leaving directory `/simulavr-0.1.2.1/src'
With the attached patch 'simulavr' can be compiled
on amd64 using gcc-4.0.
Regards
Andreas Jochens
diff -urN ../tmp-orig/simulavr-0.1.2.1/src/gdbserver.c ./src/gdbserver.c
--- ../tmp-orig/simulavr-0.1.2.1/src/gdbserver.c 2003-12-02
04:56:45.000000000 +0100
+++ ./src/gdbserver.c 2005-03-31 17:33:45.962585290 +0200
@@ -610,7 +610,7 @@
/* if ( (addr >= 0) && (addr < 32) ) */
if (0)
{
- snprintf (buf, len * 2, "E%02x", EIO);
+ snprintf ((char*)buf, len * 2, "E%02x", EIO);
}
else
{
@@ -678,10 +678,10 @@
{
/* gdb asked for memory space which doesn't exist */
avr_warning ("Invalid memory address: 0x%x.\n", addr);
- snprintf (buf, len * 2, "E%02x", EIO);
+ snprintf ((char*)buf, len * 2, "E%02x", EIO);
}
- gdb_send_reply (fd, buf);
+ gdb_send_reply (fd, (char*)buf);
avr_free (buf);
}
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]