From: Mika Laitio Date: Mon, 23 Jul 2012 15:19:41 +0000 (+0300) Subject: warning cleanups X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=af4f692075c8e9530a19090725dc87a7ecfaebe9;p=libplp.git warning cleanups Signed-off-by: Mika Laitio --- diff --git a/src/DeviceConfig.cc b/src/DeviceConfig.cc index 9b3a100..38941f3 100644 --- a/src/DeviceConfig.cc +++ b/src/DeviceConfig.cc @@ -324,12 +324,12 @@ ConfigHandle *DeviceConfig::load_device_config(string device_id_param) { } } else { - log_error("Failed to load device device configuration, memory allocation error.\n"); + log_error("Failed to load device configuration, memory allocation error.\n"); set_config_value(DEVICE_CONFIG_VALUE_KEY__TYPE, ""); } } else { - log_error("Failed to load device device configuration, file does not exist: %s.\n", cfg_fl.c_str()); + log_error("Failed to load device configuration, file does not exist: %s.\n", cfg_fl.c_str()); } } return ret_val; diff --git a/src/StoreDay.cc b/src/StoreDay.cc index 957b7ef..a29c6a0 100644 --- a/src/StoreDay.cc +++ b/src/StoreDay.cc @@ -80,7 +80,11 @@ void StoreDay::save(string device_id, ostream = NULL; f_path = ""; - log_info("[%s] writing %lu data values to save.\n", device_id.c_str(), data_list->size()); + /* needs to be casted to long unsigned int value is "unsigned int" in some + toolchains and that would otherwise cause an warning/error + */ + log_info("[%s] writing %lu data values to save.\n", device_id.c_str(), + (long unsigned int)data_list->size()); // TODO: add mutex to protect string_list while it's read and emptied for(iter = data_list->begin(); iter != data_list->end(); iter++) { data = (Data *)*iter;