Prevent compiler warnings

Fixes #464.
This commit is contained in:
Christian Helmuth 2012-11-05 10:57:29 +01:00
parent c99dd8fdf8
commit 7c77d0ee5f
2 changed files with 7 additions and 7 deletions

View File

@ -57,8 +57,8 @@ extern "C" int lx_clone(int (*fn)(void *), void *child_stack,
inline Genode::uint16_t lx_bswap16(Genode::uint16_t x)
{
char v[2] = {
(x & 0xff00) >> 8,
(x & 0x00ff) >> 0,
(char)((x & 0xff00) >> 8),
(char)((x & 0x00ff) >> 0),
};
return *(Genode::uint16_t *)v;
}
@ -67,10 +67,10 @@ inline Genode::uint16_t lx_bswap16(Genode::uint16_t x)
inline Genode::uint32_t lx_bswap32(Genode::uint32_t x)
{
char v[4] = {
(x & 0xff000000) >> 24,
(x & 0x00ff0000) >> 16,
(x & 0x0000ff00) >> 8,
(x & 0x000000ff) >> 0,
(char)((x & 0xff000000) >> 24),
(char)((x & 0x00ff0000) >> 16),
(char)((x & 0x0000ff00) >> 8),
(char)((x & 0x000000ff) >> 0),
};
return *(Genode::uint32_t *)v;
}

View File

@ -20,7 +20,7 @@ extern "C" {
extern "C" void dde_kit_print(const char *msg)
{
Genode::printf(msg);
Genode::printf("%s", msg);
}