Fix wrong log format 16/141116/1
authorjusung son <jusung07.son@samsung.com>
Fri, 28 Jul 2017 07:36:20 +0000 (16:36 +0900)
committerjusung son <jusung07.son@samsung.com>
Fri, 28 Jul 2017 07:36:20 +0000 (16:36 +0900)
Change-Id: I92fa4ad7828ca9e3f1ed04ce8d6dc2230180b8a7
Signed-off-by: jusung son <jusung07.son@samsung.com>
src/data_control_sql_cursor.c

index 25b080fa67995b301fa7f106c47dbe82f024a31f..5886590fe858ab7fe455fe1efc574e99f3bb3d05 100755 (executable)
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+#define _GNU_SOURCE
+
 #include <stdlib.h>
 #include <string.h>
 
@@ -180,7 +182,7 @@ EXPORT_API int data_control_sql_get_column_name(result_set_cursor cursor,
        fd = __cursor->resultset_fd;
        ret = lseek(fd, __cursor->resultset_col_name_offset, SEEK_SET);
        if (ret < 0) {
-               _LOGE("unable to seek in the resultset file: %d %s",
+               _LOGE("unable to seek in the resultset file: %ld %s",
                                __cursor->resultset_current_offset,
                                strerror_r(errno, err_buf, sizeof(err_buf)));
                return DATA_CONTROL_ERROR_IO_ERROR;
@@ -247,7 +249,7 @@ EXPORT_API int data_control_sql_get_column_item_size(result_set_cursor cursor,
        fd = __cursor->resultset_fd;
        ret = lseek(fd, __cursor->resultset_current_offset, SEEK_SET);
        if (ret < 0) {
-               _LOGE("unable to seek in the resultset file: %d %s",
+               _LOGE("unable to seek in the resultset file: %ld %s",
                                __cursor->resultset_current_offset,
                                strerror_r(errno, err_buf, sizeof(err_buf)));
                return DATA_CONTROL_ERROR_IO_ERROR;
@@ -701,7 +703,7 @@ EXPORT_API int data_control_sql_get_text_data(result_set_cursor cursor,
        }
 
        if (type != (int)DATA_CONTROL_SQL_COLUMN_TYPE_TEXT) {
-               _LOGE("type mismatch: requested for text type but %d present %d", type,
+               _LOGE("type mismatch: requested for text type but %d present %ld", type,
                                __cursor->resultset_current_offset);
                return DATA_CONTROL_ERROR_INVALID_PARAMETER;
        }