diff options
-rw-r--r-- | src/lib/dlt_user.c | 6 | ||||
-rw-r--r-- | src/shared/dlt_common.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c index fff621e..5a880dc 100644 --- a/src/lib/dlt_user.c +++ b/src/lib/dlt_user.c @@ -1071,7 +1071,7 @@ DltReturnValue dlt_free(void) if (bytes_read >= 0) { if (!bytes_read) break; - dlt_vlog(LOG_NOTICE, "[%s] data is still readable... [%ld] bytes read\n", + dlt_vlog(LOG_NOTICE, "[%s] data is still readable... [%zd] bytes read\n", __func__, bytes_read); } } @@ -3878,7 +3878,7 @@ DltReturnValue dlt_user_log_send_log(DltContextData *log, int mtype) /* Get file size */ struct stat st; fstat(dlt_user.dlt_log_handle, &st); - dlt_vlog(LOG_DEBUG, "%s: Current file size=[%ld]\n", __func__, + dlt_vlog(LOG_DEBUG, "%s: Current file size=[%jd]\n", __func__, st.st_size); /* Check filesize */ @@ -3888,7 +3888,7 @@ DltReturnValue dlt_user_log_send_log(DltContextData *log, int mtype) if (msg_size > dlt_user.filesize_max) { dlt_user_file_reach_max = true; dlt_vlog(LOG_ERR, - "%s: File size (%ld bytes) reached to defined maximum size (%d bytes)\n", + "%s: File size (%jd bytes) reached to defined maximum size (%d bytes)\n", __func__, st.st_size, dlt_user.filesize_max); return DLT_RETURN_FILESZERR; } diff --git a/src/shared/dlt_common.c b/src/shared/dlt_common.c index de65201..e964d1b 100644 --- a/src/shared/dlt_common.c +++ b/src/shared/dlt_common.c @@ -1488,7 +1488,7 @@ DltReturnValue dlt_file_open(DltFile *file, const char *filename, int verbose) if (verbose) /* print file length */ - dlt_vlog(LOG_DEBUG, "File is %lu bytes long\n", file->file_length); + dlt_vlog(LOG_DEBUG, "File is %" PRIu64 "bytes long\n", file->file_length); return DLT_RETURN_OK; } @@ -1521,14 +1521,14 @@ DltReturnValue dlt_file_read(DltFile *file, int verbose) /* set to end of last succesful read message, because of conflicting calls to dlt_file_read and dlt_file_message */ if (0 != fseek(file->handle, file->file_position, SEEK_SET)) { - dlt_vlog(LOG_WARNING, "Seek failed to file_position %lu\n", + dlt_vlog(LOG_WARNING, "Seek failed to file_position %" PRIu64 "\n", file->file_position); return DLT_RETURN_ERROR; } /* get file position at start of DLT message */ if (verbose) - dlt_vlog(LOG_INFO, "Position in file: %lu\n", file->file_position); + dlt_vlog(LOG_INFO, "Position in file: %" PRIu64 "\n", file->file_position); /* read header */ if (dlt_file_read_header(file, verbose) < DLT_RETURN_OK) { @@ -1639,7 +1639,7 @@ DltReturnValue dlt_file_read_raw(DltFile *file, int resync, int verbose) /* get file position at start of DLT message */ if (verbose) - dlt_vlog(LOG_DEBUG, "Position in file: %lu\n", file->file_position); + dlt_vlog(LOG_DEBUG, "Position in file: %" PRIu64 "\n", file->file_position); /* read header */ if (dlt_file_read_header_raw(file, resync, verbose) < DLT_RETURN_OK) { @@ -4148,7 +4148,7 @@ DltReturnValue dlt_file_quick_parsing(DltFile *file, const char *filename, while (ret >= DLT_RETURN_OK && file->file_position < file->file_length) { /* get file position at start of DLT message */ if (verbose) - dlt_vlog(LOG_DEBUG, "Position in file: %lu\n", file->file_position); + dlt_vlog(LOG_DEBUG, "Position in file: %" PRIu64 "\n", file->file_position); /* read all header and payload */ ret = dlt_file_read_header(file, verbose); |