Fixed build errors 34/198934/1 submit/tizen/20190131.065036
authorsaerome.kim <saerome.kim@samsung.com>
Thu, 31 Jan 2019 06:31:36 +0000 (15:31 +0900)
committersaerome.kim <saerome.kim@samsung.com>
Thu, 31 Jan 2019 06:33:15 +0000 (15:33 +0900)
Change-Id: I26b0e508a06ae7f34e92a5bda25c5c463d384af3
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
src/mdg-manager/src/mdgd_gdbus.c
src/mdg-manager/src/mdgd_group.c
src/mdg-manager/src/mdgd_iot_client.cpp
src/mdg-manager/src/mdgd_iot_server.cpp

index 3b3fad1..770bee3 100644 (file)
@@ -212,7 +212,6 @@ gboolean group_send_data(Group *group, GDBusMethodInvocation *invocation,
        int ret = MDGD_ERROR_NONE;
        const gchar *sender = g_dbus_method_invocation_get_sender(invocation);
 
-       int length = 0;
        int len;
        int iter_len;
        unsigned char *data;
@@ -258,7 +257,6 @@ gboolean group_send_response(Group *group, GDBusMethodInvocation *invocation,
        int ret = MDGD_ERROR_NONE;
        const gchar *sender = g_dbus_method_invocation_get_sender(invocation);
 
-       int length = 0;
        int len;
        int iter_len;
        unsigned char *data;
index b9538e1..6c6ca4e 100644 (file)
@@ -48,8 +48,6 @@ int mdgd_group_delete(char *name)
 
        LOG_BEGIN();
 
-       mdgd_context_t *mdgd_ctx = mdgd_context_get_context();
-
        /* Get all device in group */
        mdgd_db_get_devices_in_group(name, &devices, &device_count);
        for (int i = 0; i < device_count; i++) {
index 05682c6..e80bd6b 100644 (file)
@@ -168,7 +168,7 @@ static gpointer __file_send_thread_func(gpointer user_data)
                                                      mdgd_create_variant_progress(cmd->arg1, num_total, total_bytes, cur_percent));
                        }
                } else if (num_read == 0 && num_total == total_bytes) {
-                       LOG_DEBUG("file trans complete : %d bytes\n", num_total);
+                       LOG_DEBUG("file trans complete : %ld bytes\n", num_total);
                        break;
                } else {
                        char buf[128];
index a7530ed..8716c90 100644 (file)
@@ -174,7 +174,7 @@ static gpointer __file_receive_thread_func(gpointer user_data)
                client_len = sizeof(clientaddr);
                client_sockfd = accept(server_sockfd, (struct sockaddr *)&clientaddr, &client_len);
                inet_ntop(AF_INET, &clientaddr.sin_addr.s_addr, client_ipaddr, sizeof(client_ipaddr));
-               LOG_DEBUG("Accepted IP : %s, client socket : %d", client_ipaddr);
+               LOG_DEBUG("Accepted IP : %s, client socket : %d", client_ipaddr, client_sockfd);
        }
 
        if (client_sockfd == -1) {
@@ -326,9 +326,9 @@ OCEntityHandlerResult _request_handler(std::shared_ptr<OCResourceRequest> reques
                          observationInfo.address.c_str(), observationInfo.port);
                LOG_DEBUG("Request type %s, flag %x", requestType.c_str(), requestFlag);
                for (auto &attribute : requestRep) {
-                       LOG_DEBUG("%s of type %d with value %s", attribute.attrname().c_str(),
-                                 attribute.type(),
-                                 attribute.getValueToString().c_str());
+                       LOG_DEBUG("%s of type %d with value %s", (char *)attribute.attrname().c_str(),
+                                 (int)attribute.type(),
+                                 (char *)attribute.getValueToString().c_str());
                }
 
                if (requestType == "GET") {