]> pilppa.com Git - libplpbus.git/commitdiff
removed warnings from uninitialized variables.
authorMika Laitio <lamikr@pilppa.org>
Sun, 13 Mar 2011 19:06:11 +0000 (21:06 +0200)
committerMika Laitio <lamikr@pilppa.org>
Sun, 13 Mar 2011 19:06:11 +0000 (21:06 +0200)
Signed-off-by: Mika Laitio <lamikr@pilppa.org>
src/plpbus/BusMessage.cc

index 6da32de0d0edb9a3ce1d0e9a2e87c10dbf5dada2..0b1d9015130f26dba13625edcbfcb77c7dd5f2d4 100644 (file)
@@ -214,6 +214,7 @@ long BusMessage::get_type(int *err_flg) {
        long    ret_val;
        long    res;
 
+       ret_val = -1;
        res     = get_long_parameter(CONST_MSG_ID_KEY_NAME, err_flg);
        if (*err_flg == PLP_OK) {
                ret_val = res;
@@ -244,6 +245,7 @@ long BusMessage::get_long_parameter(string arg_name_param, int *err_flg) {
        DataItem                *item;
        DataItemSequence        *seq;
 
+       ret_val         = 0;
        *err_flg        = PLP_ERR_DATA_NOT_FOUND;
        seq             = (DataItemSequence *)_dataItemSeq;
        item            = get_dataitem_by_param_name(seq, arg_name_param);
@@ -260,6 +262,7 @@ int BusMessage::get_int_parameter(string arg_name_param, int *err_flg) {
        DataItemSequence        *seq;
        long                    tmp;
 
+       ret_val         = 0;
        *err_flg        = PLP_ERR_DATA_NOT_FOUND;
        seq             = (DataItemSequence *)_dataItemSeq;
        item            = get_dataitem_by_param_name(seq, arg_name_param);
@@ -276,6 +279,7 @@ double BusMessage::get_double_parameter(string arg_name_param, int *err_flg) {
        DataItem        *item;
        DataItemSequence *seq;
 
+       ret_val         = 0;
        *err_flg        = PLP_ERR_DATA_NOT_FOUND;
        seq             = (DataItemSequence *)_dataItemSeq;
        item            = get_dataitem_by_param_name(seq, arg_name_param);
@@ -291,6 +295,7 @@ float BusMessage::get_float_parameter(string arg_name_param, int *err_flg) {
        DataItem        *item;
        DataItemSequence *seq;
 
+       ret_val         = 0;
        *err_flg        = PLP_ERR_DATA_NOT_FOUND;
        seq             = (DataItemSequence *)_dataItemSeq;
        item            = get_dataitem_by_param_name(seq, arg_name_param);