summaryrefslogtreecommitdiff
path: root/treesource.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2008-07-07 10:14:15 +1000
committerJon Loeliger <jdl@jdl.com>2008-07-14 12:36:08 -0500
commit1409097db8be6ba662e3808654671554c5803bf0 (patch)
tree1ec978e791206ecb3bf2d820022059662eb6eaf8 /treesource.c
parent36786db6154533b67d736b414ef63b4457009326 (diff)
downloaddtc-1409097db8be6ba662e3808654671554c5803bf0.tar.gz
dtc: Enable and fix -Wcast-qual warnings
Enabling -Wcast-qual warnings in dtc shows up a number of places where we are incorrectly discarding a const qualification. There are also some places where we are intentionally discarding the 'const', and we need an ugly cast through uintptr_t to suppress the warning. However, most of these are pretty well isolated with the *_w() functions. So in the interests of maximum safety with const qualifications, this patch enables the warnings and fixes the existing complaints. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'treesource.c')
-rw-r--r--treesource.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/treesource.c b/treesource.c
index c32e818..ebeb6eb 100644
--- a/treesource.c
+++ b/treesource.c
@@ -176,7 +176,7 @@ static void write_propval_bytes(FILE *f, struct data val)
}
fprintf(f, "%02hhx", *bp++);
- if ((void *)bp >= propend)
+ if ((const void *)bp >= propend)
break;
fprintf(f, " ");
}