From 4bfd0d2914d0d113ec5642618d3dcc6ffcd5bd60 Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Sun, 13 Mar 2011 21:06:11 +0200 Subject: [PATCH] removed warnings from uninitialized variables. Signed-off-by: Mika Laitio --- src/plpbus/BusMessage.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plpbus/BusMessage.cc b/src/plpbus/BusMessage.cc index 6da32de..0b1d901 100644 --- a/src/plpbus/BusMessage.cc +++ b/src/plpbus/BusMessage.cc @@ -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); -- 2.41.1