[libbluray-devel] Avoid using %z in debug messages
hpi1
git at videolan.org
Thu Oct 10 08:57:22 CEST 2013
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Oct 10 09:56:32 2013 +0300| [78969802f54089fb9064713b9952b20dc11d099b] | committer: hpi1
Avoid using %z in debug messages
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=78969802f54089fb9064713b9952b20dc11d099b
---
src/libbluray/bluray.c | 11 +++++------
src/libbluray/decoders/pg_decode.c | 6 ++----
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 928ab87..931d795 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -559,16 +559,15 @@ static int _read_block(BLURAY *bd, BD_STREAM *st, uint8_t *buf)
const size_t len = 6144;
if (st->fp) {
- BD_DEBUG(DBG_STREAM, "Reading unit [%zd bytes] at %"PRIu64"...\n",
- len, st->clip_block_pos);
+ BD_DEBUG(DBG_STREAM, "Reading unit at %"PRIu64"...\n", st->clip_block_pos);
if (len + st->clip_block_pos <= st->clip_size) {
size_t read_len;
if ((read_len = file_read(st->fp, buf, len))) {
- if (read_len != len)
- BD_DEBUG(DBG_STREAM | DBG_CRIT, "Read %zd bytes at %"PRIu64" ; requested %zd !\n", read_len, st->clip_block_pos, len);
-
+ if (read_len != len) {
+ BD_DEBUG(DBG_STREAM | DBG_CRIT, "Read %d bytes at %"PRIu64" ; requested %d !\n", (int)read_len, st->clip_block_pos, (int)len);
+ }
if (bd->libaacs && libaacs_decrypt_unit(bd->libaacs, buf)) {
return -1;
}
@@ -599,7 +598,7 @@ static int _read_block(BLURAY *bd, BD_STREAM *st, uint8_t *buf)
#endif
}
- BD_DEBUG(DBG_STREAM | DBG_CRIT, "Read %zd bytes at %"PRIu64" failed !\n", len, st->clip_block_pos);
+ BD_DEBUG(DBG_STREAM | DBG_CRIT, "Read unit at %"PRIu64" failed !\n", st->clip_block_pos);
_queue_event(bd, BD_EVENT_READ_ERROR, 0);
diff --git a/src/libbluray/decoders/pg_decode.c b/src/libbluray/decoders/pg_decode.c
index 5f81020..21ff158 100644
--- a/src/libbluray/decoders/pg_decode.c
+++ b/src/libbluray/decoders/pg_decode.c
@@ -126,8 +126,7 @@ static int _decode_rle(BITBUFFER *bb, BD_PG_OBJECT *p)
p->img = refcnt_realloc(p->img, rle_size * sizeof(BD_PG_RLE_ELEM));
if (!p->img) {
- BD_DEBUG(DBG_DECODE | DBG_CRIT, "pg_decode_object(): relloc(%zu) failed\n",
- rle_size * sizeof(BD_PG_RLE_ELEM));
+ BD_DEBUG(DBG_DECODE | DBG_CRIT, "pg_decode_object(): realloc failed\n");
return 0;
}
@@ -168,8 +167,7 @@ static int _decode_rle(BITBUFFER *bb, BD_PG_OBJECT *p)
rle_size *= 2;
p->img = refcnt_realloc(p->img, rle_size * sizeof(BD_PG_RLE_ELEM));
if (!p->img) {
- BD_DEBUG(DBG_DECODE | DBG_CRIT, "pg_decode_object(): relloc(%zu) failed\n",
- rle_size * sizeof(BD_PG_RLE_ELEM));
+ BD_DEBUG(DBG_DECODE | DBG_CRIT, "pg_decode_object(): realloc failed\n");
X_FREE(tmp);
return 0;
}
More information about the libbluray-devel
mailing list