]> pilppa.com Git - libplp.git/commitdiff
warning cleanups
authorMika Laitio <lamikr@pilppa.org>
Mon, 23 Jul 2012 15:19:41 +0000 (18:19 +0300)
committerMika Laitio <lamikr@pilppa.org>
Mon, 23 Jul 2012 15:19:41 +0000 (18:19 +0300)
Signed-off-by: Mika Laitio <lamikr@pilppa.org>
src/DeviceConfig.cc
src/StoreDay.cc

index 9b3a1007c7e6b7841ef3a3e1ba307a3226749f32..38941f3cb508dc52d5abaee2c4c46e7d91c5f133 100644 (file)
@@ -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;
index 957b7efc5d4a033593431b1ff6b5cdf26c09490a..a29c6a092dce630cc8947ef017c1844ed268f450 100644 (file)
@@ -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;