genodelabs/genode — pull request #449 by myrkr (2012-10-29 07:11:02+00:00)
Title: loader_session: Fixes some g++ warnings about uninitialized variable

g++ 4.4.5 outputs the following warnings in our code using the loader
session:

.../base/include/base/capability.h: In member function 'typename Genode::Trait::Call_return::Type Genode::Capability::call() const [with IF = Loader::Session::Rpc_view_geometry, RPC_INTERFACE = Loader::Session]':
.../base/include/base/capability.h:207: warning: 'ret.Genode::Capability::Return::_value.Loader::Session::View_geometry::width' may be used uninitialized in this function
.../base/include/base/capability.h:207: warning: 'ret.Genode::Capability::Return::_value.Loader::Session::View_geometry::height' may be used uninitialized in this function
.../base/include/base/capability.h:207: warning: 'ret.Genode::Capability::Return::_value.Loader::Session::View_geometry::buf_x' may be used uninitialized in this function
.../base/include/base/capability.h:207: warning: 'ret.Genode::Capability::Return::_value.Loader::Session::View_geometry::buf_y' may be used uninitialized in this function

This is easily fixed with providing a default constructor.

Because of the C++ rules regarding initialer lists code that used
them for View_geometry had to be modified to use a normal construction
call. In my tests only Nitpicker had to be changed.