Commit 822ab4a2 authored by George Nash's avatar George Nash Committed by Kishen Maloor

Fixed build warnings

Fixed multiple build warnings for using %d for values
that are larger than an int.

All the warnings were related to print statments or
logging.

Change-Id: I5d09d220d85a5cd526061ad6f2f8f72afda21368
Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
parent 8edc9d03
......@@ -83,7 +83,7 @@ oc_core_introspection_data_handler(oc_request_t *request,
request->response->response_buffer->code = oc_status_code(OC_STATUS_OK);
} else {
OC_ERR(
"oc_core_introspection_data_handler : %d is too big for buffer %d \n",
"oc_core_introspection_data_handler : %ld is too big for buffer %ld \n",
IDD_size, OC_MAX_APP_DATA_SIZE);
request->response->response_buffer->response_length = (uint16_t)0;
request->response->response_buffer->code =
......
......@@ -90,7 +90,7 @@ get_array(oc_client_response_t *data)
case OC_REP_INT_ARRAY: {
int64_t *arr = oc_int_array(rep->value.array);
for (i = 0; i < (int)oc_int_array_size(rep->value.array); i++) {
PRINT("(%d %d) ", i, arr[i]);
PRINT("(%d %lld) ", i, arr[i]);
}
PRINT("\n");
} break;
......
......@@ -151,7 +151,7 @@ parse_payload(oc_client_response_t *data)
state = rep->value.boolean;
break;
case OC_REP_INT:
printf("%d\n", rep->value.integer);
printf("%lld\n", rep->value.integer);
power = (int)rep->value.integer;
break;
case OC_REP_STRING:
......
......@@ -83,7 +83,7 @@ post_array(oc_request_t *request, oc_interface_mask_t iface_mask,
case OC_REP_INT_ARRAY: {
int64_t *arr = oc_int_array(rep->value.array);
for (i = 0; i < (int)oc_int_array_size(rep->value.array); i++) {
PRINT("(%d %d) ", i, arr[i]);
PRINT("(%d %lld) ", i, arr[i]);
}
PRINT("\n");
} break;
......
......@@ -65,7 +65,7 @@ observe_light(oc_client_response_t *data)
state = rep->value.boolean;
break;
case OC_REP_INT:
PRINT("%d\n", rep->value.integer);
PRINT("%lld\n", rep->value.integer);
power = (int)rep->value.integer;
break;
case OC_REP_STRING:
......@@ -158,7 +158,7 @@ get_light(oc_client_response_t *data)
state = rep->value.boolean;
break;
case OC_REP_INT:
PRINT("%d\n", rep->value.integer);
PRINT("%lld\n", rep->value.integer);
power = (int)rep->value.integer;
break;
case OC_REP_STRING:
......
......@@ -47,7 +47,7 @@ get_temp(oc_client_response_t *data)
PRINT("key %s, value ", oc_string(rep->name));
switch (rep->type) {
case OC_REP_INT:
PRINT("%d\n", rep->value.integer);
PRINT("%lld\n", rep->value.integer);
temperature = (int)rep->value.integer;
break;
default:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment