This patch fixes new sites since the following commit:
commit
1974687e6b7a08d8383a4a5c75265d0ed3b8c5c9
Author: Michael Jeanson <mjeanson@efficios.com>
Date: Mon Jul 10 12:39:38 2017 -0400
Port: handle 'size_t' / 'off_t' on Solaris
The size of 'size_t' / 'off_t' vary on some platforms, use C99 portable
macros and print formats to handle them.
Print 'size_t' with '%zu' and use SIZE_MAX as max value.
Print 'off_t' casted to 'intmax_t' with '%jd'.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I8c0677f5ff590c25df6257c2d3f5142de93d01b0
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1803
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
BT_ASSERT(notit);
if (offset < 0) {
BT_ASSERT(notit);
if (offset < 0) {
- BT_COMP_LOGE("Cannot seek to negative offset: offset=%jd", offset);
+ BT_COMP_LOGE("Cannot seek to negative offset: offset=%jd", (intmax_t) offset);
ret = BT_MSG_ITER_STATUS_INVAL;
goto end;
}
ret = BT_MSG_ITER_STATUS_INVAL;
goto end;
}
if (whence != BT_MSG_ITER_SEEK_WHENCE_SET ||
offset < 0 || offset > file_size) {
BT_COMP_LOGE("Invalid medium seek request: whence=%d, offset=%jd, "
if (whence != BT_MSG_ITER_SEEK_WHENCE_SET ||
offset < 0 || offset > file_size) {
BT_COMP_LOGE("Invalid medium seek request: whence=%d, offset=%jd, "
- "file-size=%jd", (int) whence, offset,
- file_size);
+ "file-size=%jd", (int) whence, (intmax_t) offset,
+ (intmax_t) file_size);
ret = BT_MSG_ITER_MEDIUM_STATUS_INVAL;
goto end;
}
ret = BT_MSG_ITER_MEDIUM_STATUS_INVAL;
goto end;
}
int unmap_ret;
BT_COMP_LOGD("Medium seek request cannot be accomodated by the current "
"file mapping: offset=%jd, mmap-offset=%jd, "
int unmap_ret;
BT_COMP_LOGD("Medium seek request cannot be accomodated by the current "
"file mapping: offset=%jd, mmap-offset=%jd, "
- "mmap-len=%zu", offset, ds_file->mmap_offset,
+ "mmap-len=%zu", (intmax_t) offset, (intmax_t) ds_file->mmap_offset,
ds_file->mmap_len);
unmap_ret = ds_file_munmap(ds_file);
if (unmap_ret) {
ds_file->mmap_len);
unmap_ret = ds_file_munmap(ds_file);
if (unmap_ret) {
"packet-offset=%jd, packet-size-bytes=%jd, "
"file-size=%jd",
ds_file->file->path->str,
"packet-offset=%jd, packet-size-bytes=%jd, "
"file-size=%jd",
ds_file->file->path->str,
- current_packet_offset_bytes,
- current_packet_size_bytes,
- ds_file->file->size);
+ (intmax_t) current_packet_offset_bytes,
+ (intmax_t) current_packet_size_bytes,
+ (intmax_t) ds_file->file->size);
current_packet_offset_bytes += current_packet_size_bytes;
BT_COMP_LOGD("Seeking to next packet: current-packet-offset=%jd, "
"next-packet-offset=%jd",
current_packet_offset_bytes += current_packet_size_bytes;
BT_COMP_LOGD("Seeking to next packet: current-packet-offset=%jd, "
"next-packet-offset=%jd",
- current_packet_offset_bytes - current_packet_size_bytes,
- current_packet_offset_bytes);
+ (intmax_t) (current_packet_offset_bytes - current_packet_size_bytes),
+ (intmax_t) current_packet_offset_bytes);
} while (iter_status == BT_MSG_ITER_STATUS_OK);
} while (iter_status == BT_MSG_ITER_STATUS_OK);