From 6a24d70120c54da186cc6d79a0e0341c4a261458 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 24 Nov 2016 17:45:15 +0100 Subject: [PATCH] Fix clang compile errors Thanks Keiko Nakata for reporting! Fixes #2164 --- repos/base/src/lib/base/slab.cc | 4 ++-- repos/os/include/net/tcp.h | 2 +- repos/os/include/spec/rpi/platform/property_message.h | 4 ++-- repos/os/src/server/tz_vmm/block.cc | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/repos/base/src/lib/base/slab.cc b/repos/base/src/lib/base/slab.cc index 37bafd8627..8d7488f793 100644 --- a/repos/base/src/lib/base/slab.cc +++ b/repos/base/src/lib/base/slab.cc @@ -45,7 +45,7 @@ class Genode::Slab::Block * the Slab allocator). */ - char _data[]; /* dynamic data (state table and slab entries) */ + char _data[0]; /* dynamic data (state table and slab entries) */ /* * Caution! no member variables allowed below this line! @@ -108,7 +108,7 @@ class Genode::Slab::Block struct Genode::Slab::Entry { Block █ - char data[]; + char data[0]; /* * Caution! no member variables allowed below this line! diff --git a/repos/os/include/net/tcp.h b/repos/os/include/net/tcp.h index a4664532a3..4e639a25e4 100644 --- a/repos/os/include/net/tcp.h +++ b/repos/os/include/net/tcp.h @@ -50,7 +50,7 @@ class Net::Tcp_packet uint16_t _window_size; uint16_t _checksum; uint16_t _urgent_ptr; - uint32_t _data[]; + uint32_t _data[0]; struct Flags : Genode::Register<8> { diff --git a/repos/os/include/spec/rpi/platform/property_message.h b/repos/os/include/spec/rpi/platform/property_message.h index b283ef673c..5988f3e676 100644 --- a/repos/os/include/spec/rpi/platform/property_message.h +++ b/repos/os/include/spec/rpi/platform/property_message.h @@ -46,7 +46,7 @@ struct Platform::Property_message /* * Start of the buffer that contains a sequence of tags */ - char buffer[]; + char buffer[0]; /* * There must be no member variables after this point @@ -75,7 +75,7 @@ struct Platform::Property_message */ uint32_t volatile const len; - char payload[]; + char payload[0]; /** * Utility for returning a response size of a tag type diff --git a/repos/os/src/server/tz_vmm/block.cc b/repos/os/src/server/tz_vmm/block.cc index 0a41a16053..6fd762bad5 100644 --- a/repos/os/src/server/tz_vmm/block.cc +++ b/repos/os/src/server/tz_vmm/block.cc @@ -34,7 +34,7 @@ class Reply unsigned long _req; unsigned long _write; unsigned long _data_size; - unsigned long _data[]; + unsigned long _data[0]; public: