Hi Marcel,

On Mon, Apr 11, 2011 at 5:48 PM, Marcel Holtmann <[email protected]> wrote:
> Hi Luiz,
>
>> GCC 4.5.2 (Ubuntu 10.04):
>> cc1: warnings being treated as errors
>> src/session.c: In function ‘connect_session’:
>> src/session.c:606:14: error: ‘callback’ may be used uninitialized in this 
>> function
>> ---
>>  src/session.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/src/session.c b/src/session.c
>> index 98c50ad..c819b99 100644
>> --- a/src/session.c
>> +++ b/src/session.c
>> @@ -603,7 +603,7 @@ static DBusMessage *connect_session(DBusConnection *conn,
>>  {
>>       struct connman_session *session = user_data;
>>       struct connman_service *service = NULL;
>> -     GSourceFunc callback;
>> +     GSourceFunc callback = NULL;
>>       GSequenceIter *iter;
>
> if this is clearly a false positive, then please use the
> uninitilized_var() magic we use inside oFono.

Well it could be a bug, what states the service could assume?
Apparently if all services are in disconnect state this could cause a
bug since the last service in the sequence is used but it doesn't
initialized the callback.

-- 
Luiz Augusto von Dentz
Computer Engineer
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to