mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-16 14:18:27 +00:00
Avoid superfluous compiler warnings
GCC warns about uninitialized local variables in cases where no initialization is needed, in particular in the overloads of the 'Capability::call()' function. Prior this patch, we dealt with those warnings by using an (unreliable) GCC pragma or by disabling the particular warning altogether (which is a bad idea). This patch removes the superfluous warnings by telling the compiler that the variable in question is volatile.
This commit is contained in:
@ -151,7 +151,7 @@ void Ipc_server::_prepare_next_reply_wait()
|
||||
_read_offset = sizeof(long);
|
||||
|
||||
/* read client thread id from request buffer */
|
||||
long tid;
|
||||
long tid = 0;
|
||||
if (_reply_needed) {
|
||||
_read_from_buf(tid);
|
||||
Ipc_ostream::_dst = Native_capability(tid, 0); /* only _tid member is used */
|
||||
|
Reference in New Issue
Block a user