Skip to content

Commit 0235b33

Browse files
committed
Fix printf warnings
1 parent b2d2911 commit 0235b33

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/benoic/device-modules/device-esp8266.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ json_t * b_device_connect (json_t * device, void ** device_ptr) {
9292
if (resp.status == 200) {
9393
j_param = json_pack("{si}", "result", WEBSERVICE_RESULT_OK);
9494
} else {
95-
y_log_message(Y_LOG_LEVEL_ERROR, "b_device_connect - Error invalid status: %d", resp.status);
95+
y_log_message(Y_LOG_LEVEL_ERROR, "b_device_connect - Error invalid status: %ld", resp.status);
9696
j_param = json_pack("{si}", "result", WEBSERVICE_RESULT_ERROR);
9797
}
9898
} else {

src/benoic/device-modules/device-taulas.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ json_t * b_device_overview (json_t * device, void * device_ptr) {
265265
}
266266
} else {
267267
char * str_body = json_dumps(json_body, JSON_ENCODE_ANY);
268-
y_log_message(Y_LOG_LEVEL_ERROR, "Error getting device overview, url was %s, status code is %d, json body is %s", req.http_url, resp.status, json_body);
268+
y_log_message(Y_LOG_LEVEL_ERROR, "Error getting device overview, url was %s, status code is %ld, json body is %s", req.http_url, resp.status, str_body);
269269
free(str_body);
270270
overview = json_pack("{si}", "result", WEBSERVICE_RESULT_ERROR);
271271
}

src/benoic/device-modules/device-zwave.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ void on_notification_zwave ( Notification const * _notification, void * _context
442442
case Notification::Type_NodeEvent: {
443443
char * alarm_name;
444444
// Event received
445-
y_log_message(Y_LOG_LEVEL_DEBUG, "Notification::Type_NodeEvent for NodeID %d, ValueID %x, type %x, send alert",
445+
y_log_message(Y_LOG_LEVEL_DEBUG, "Notification::Type_NodeEvent for NodeID %d, ValueID %llu, type %x, send alert",
446446
_notification->GetNodeId(),
447447
_notification->GetValueID().GetId(),
448448
_notification->GetValueID().GetCommandClassId());

src/carleon/service-modules/service-weathermap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static int weathermap_refresh_data(struct _carleon_config * config, json_t * j_w
113113
}
114114
json_decref(j_values);
115115
} else {
116-
y_log_message(Y_LOG_LEVEL_ERROR, "weathermap_refresh_data - Error http status %u for weathermap %s", resp.status, json_string_value(json_object_get(j_weathermap, "cw_name")));
116+
y_log_message(Y_LOG_LEVEL_ERROR, "weathermap_refresh_data - Error http status %ld for weathermap %s", resp.status, json_string_value(json_object_get(j_weathermap, "cw_name")));
117117
j_query = json_pack("{sss{sOsi}}",
118118
"table", WEATHERMAP_DATA_TABLE_NAME,
119119
"values",

src/script.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ int script_run(struct config_elements * config, const char * script_name) {
644644
if (j_action_list != NULL && json_is_array(j_action_list)) {
645645
json_array_foreach(j_action_list, index, j_action) {
646646
if (action_run(config, j_action) != A_OK) {
647-
y_log_message(Y_LOG_LEVEL_ERROR, "script_run - Error executing action %d in script %s", index, script_name);
647+
y_log_message(Y_LOG_LEVEL_ERROR, "script_run - Error executing action %zu in script %s", index, script_name);
648648
}
649649
}
650650
} else {
@@ -691,7 +691,7 @@ int action_run(struct config_elements * config, json_t * j_action) {
691691
is_valid = is_action_valid(config, j_action, 0);
692692
if (is_valid != NULL && json_is_array(is_valid) && json_array_size(is_valid) > 0) {
693693
error_description = json_dumps(is_valid, JSON_COMPACT);
694-
y_log_message(Y_LOG_LEVEL_ERROR, "error in action is_valid: %s", is_valid);
694+
y_log_message(Y_LOG_LEVEL_ERROR, "error in action is_valid: %s", error_description);
695695
o_free(error_description);
696696
res = A_ERROR;
697697
} else if (0 == o_strcmp(json_string_value(json_object_get(j_action, "submodule")), "benoic")) {

0 commit comments

Comments
 (0)