[Crosstoolchain-logs] [device-tree-compiler] 135/198: Correct write_propval_bytes() for platforms with signed char by default
Hector Oron
zumbi at moszumanska.debian.org
Thu Dec 8 17:07:01 UTC 2016
This is an automated email from the git hooks/post-receive script.
zumbi pushed a commit to branch upstream/1.4.x
in repository device-tree-compiler.
commit 25a9bd6267bf1a2e144344325a71432193eed4b0
Author: Andrei Errapart <andrei at errapartengineering.com>
Date: Thu Jun 19 21:05:11 2014 +1000
Correct write_propval_bytes() for platforms with signed char by default
Some platforms (including the Microsoft C compiler) have char defaulting
to signed. write_propval_bytes() in the -O dts code will not behave
correctly in this case, due to sign extension.
Signed-off-by: Andrei Errapart <andrei at errapartengineering.com>
Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
treesource.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/treesource.c b/treesource.c
index 3a87b9f..a55d1d1 100644
--- a/treesource.c
+++ b/treesource.c
@@ -178,7 +178,7 @@ static void write_propval_bytes(FILE *f, struct data val)
m = m->next;
}
- fprintf(f, "%02hhx", *bp++);
+ fprintf(f, "%02hhx", (unsigned char)(*bp++));
if ((const void *)bp >= propend)
break;
fprintf(f, " ");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git
More information about the Crosstoolchain-logs
mailing list