From 839c0263c95e48e14572cf7174354414d1072b2c Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 22 Mar 2013 12:41:21 +0100 Subject: [PATCH] Fix warning on 64bit Because the template instantiation rules of C++ do not deal well with null pointers specified as '0', the constructor of 'Local_addr' was instantiated for [T = int], which does not make sense. To avoid the warning "cast to pointer from integer of different size", we need to explicitly state that '0' is a pointer. In C++11, there is the 'nullptr' keyword, but until we switch to this version, we have to state (void *)0. --- base/include/rm_session/rm_session.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/include/rm_session/rm_session.h b/base/include/rm_session/rm_session.h index ef5c650e7..4af63c07c 100644 --- a/base/include/rm_session/rm_session.h +++ b/base/include/rm_session/rm_session.h @@ -129,7 +129,7 @@ namespace Genode { virtual Local_addr attach(Dataspace_capability ds, size_t size = 0, off_t offset = 0, bool use_local_addr = false, - Local_addr local_addr = 0, + Local_addr local_addr = (void *)0, bool executable = false) = 0; /**