From c66830263af19831f2b7db307f79d1943febf7f9 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Mon, 7 Jul 2008 10:14:15 +1000 Subject: 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 Acked-by: Gerald Van Baren --- libfdt/fdt_ro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libfdt/fdt_ro.c') diff --git a/libfdt/fdt_ro.c b/libfdt/fdt_ro.c index 8382afd38..1c897c591 100644 --- a/libfdt/fdt_ro.c +++ b/libfdt/fdt_ro.c @@ -81,7 +81,7 @@ static int nodename_eq(const void *fdt, int offset, const char *fdt_string(const void *fdt, int stroffset) { - return (char *)fdt + fdt_off_dt_strings(fdt) + stroffset; + return (const char *)fdt + fdt_off_dt_strings(fdt) + stroffset; } int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size) -- cgit v1.2.3