summaryrefslogtreecommitdiffstats
path: root/cpukit/dtc/libfdt/libfdt_internal.h
diff options
context:
space:
mode:
authorLuc Michel <luc.michel@greensocs.com>2019-09-10 12:48:24 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-03-02 07:52:20 +0100
commit94d5b6ea563d57d66080a999a9d2d4c3806b1741 (patch)
tree045b0a5f825d0b7de173e31c1bfe62361da7abe7 /cpukit/dtc/libfdt/libfdt_internal.h
parentlibfdt: Allow #size-cells of 0 (diff)
downloadrtems-94d5b6ea563d57d66080a999a9d2d4c3806b1741.tar.bz2
libfdt.h: add explicit cast from void* to uint8_t* in fdt(32|64)_st
Including libfdt.h in a C++ project fails during compilation with recent version of GCC or Clang. This simple example: extern "C" { #include <libfdt.h> } int main(void) { return 0; } leads to the following errors with GCC 9.1.0: /usr/include/libfdt.h: In function ‘void fdt32_st(void*, uint32_t)’: /usr/include/libfdt.h:139:16: error: invalid conversion from ‘void*’ to ‘uint8_t*’ {aka ‘unsigned char*’} [-fpermissive] 139 | uint8_t *bp = property; | ^~~~~~~~ | | | void* /usr/include/libfdt.h: In function ‘void fdt64_st(void*, uint64_t)’: /usr/include/libfdt.h:163:16: error: invalid conversion from ‘void*’ to ‘uint8_t*’ {aka ‘unsigned char*’} [-fpermissive] 163 | uint8_t *bp = property; | ^~~~~~~~ | | | void* This commit adds an explicit cast to uint8_t* to fix this issue. Signed-off-by: Luc Michel <luc.michel@greensocs.com> Message-Id: <20190910104824.1321594-1-luc.michel@greensocs.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions