[rtems commit] cpukit/libmisc/dumpbuf/dumpbuf.c: Fix compilation warnings
Joel Sherril
joel at rtems.org
Thu Sep 3 21:09:27 UTC 2015
Module: rtems
Branch: 4.11
Commit: ccebc571d447537208d2a861aa2ff0cf339839a7
Changeset: http://git.rtems.org/rtems/commit/?id=ccebc571d447537208d2a861aa2ff0cf339839a7
Author: Martin Galvan <martin.galvan at tallertechnologies.com>
Date: Thu Sep 3 15:55:52 2015 -0500
cpukit/libmisc/dumpbuf/dumpbuf.c: Fix compilation warnings
Compiling dumpbuf.c causes the following warning to be issued:
warning: pointer targets in passing argument 1 of 'snprintf' differ in signedness [-Wpointer-sign]
This happens because line_buffer is declared as unsigned.
Closes #2411.
---
cpukit/libmisc/dumpbuf/dumpbuf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpukit/libmisc/dumpbuf/dumpbuf.c b/cpukit/libmisc/dumpbuf/dumpbuf.c
index bb63997..2f2cd10 100644
--- a/cpukit/libmisc/dumpbuf/dumpbuf.c
+++ b/cpukit/libmisc/dumpbuf/dumpbuf.c
@@ -80,7 +80,7 @@ void rtems_print_buffer(const unsigned char *buffer, const int length)
static void Dump_Line(const unsigned char *buffer, const unsigned int length)
{
unsigned int i;
- static unsigned char line_buffer[ROW_LENGTH] = "";
+ static char line_buffer[ROW_LENGTH] = "";
size_t tmp_len;
/* Output the hex value of each byte. */
More information about the vc
mailing list