[libdvdnav-devel] [PATCH 2/7] src/dvd_reader.c: Fix a couple of fprintf format strings

Andrew Clayton andrew at digital-domain.net
Fri Oct 24 16:21:30 CEST 2014


In DVDReadBlocksPath() there are a couple of fprintf()'s displaying an
offset value, this value is an unsigned int but the format strings had
%d rather than %u.

Signed-off-by: Andrew Clayton <andrew at digital-domain.net>
---
 src/dvd_reader.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/dvd_reader.c b/src/dvd_reader.c
index fb045b3..c67c50c 100644
--- a/src/dvd_reader.c
+++ b/src/dvd_reader.c
@@ -1183,7 +1183,7 @@ static int DVDReadBlocksPath( const dvd_file_t *dvd_file, unsigned int offset,
       if( ( offset + block_count ) <= dvd_file->title_sizes[ i ] ) {
         off = dvdinput_seek( dvd_file->title_devs[ i ], (int)offset );
         if( off < 0 || off != (int)offset ) {
-          fprintf( stderr, "libdvdread: Can't seek to block %d\n",
+          fprintf( stderr, "libdvdread: Can't seek to block %u\n",
                    offset );
           return off < 0 ? off : 0;
         }
@@ -1198,7 +1198,7 @@ static int DVDReadBlocksPath( const dvd_file_t *dvd_file, unsigned int offset,
         /* Read part 1 */
         off = dvdinput_seek( dvd_file->title_devs[ i ], (int)offset );
         if( off < 0 || off != (int)offset ) {
-          fprintf( stderr, "libdvdread: Can't seek to block %d\n",
+          fprintf( stderr, "libdvdread: Can't seek to block %u\n",
                    offset );
           return off < 0 ? off : 0;
         }
-- 
1.9.3



More information about the libdvdnav-devel mailing list