diff options
Diffstat (limited to 'src/input/libdvdnav/dvd_reader.c')
-rw-r--r-- | src/input/libdvdnav/dvd_reader.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input/libdvdnav/dvd_reader.c b/src/input/libdvdnav/dvd_reader.c index 63076ac97..40bed7ea6 100644 --- a/src/input/libdvdnav/dvd_reader.c +++ b/src/input/libdvdnav/dvd_reader.c @@ -1001,7 +1001,7 @@ ssize_t DVDReadBytes( dvd_file_t *dvd_file, void *data, size_t byte_size ) ( ( ( seek_byte + byte_size ) % DVD_VIDEO_LB_LEN ) ? 1 : 0 ); secbuf_base = (unsigned char *) malloc( numsec * DVD_VIDEO_LB_LEN + 2048 ); - secbuf = (unsigned char *)(((int)secbuf_base & ~2047) + 2048); + secbuf = (unsigned char *)(((uintptr_t)secbuf_base & ~2047) + 2048); if( !secbuf_base ) { fprintf( stderr, "libdvdread: Can't allocate memory " "for file read!\n" ); @@ -1055,7 +1055,7 @@ int DVDDiscID( dvd_reader_t *dvd, unsigned char *discid ) ssize_t bytes_read; size_t file_size = dvd_file->filesize * DVD_VIDEO_LB_LEN; char *buffer_base = malloc( file_size + 2048 ); - char *buffer = (unsigned char *)(((int)buffer_base & ~2047) + 2048); + char *buffer = (unsigned char *)(((uintptr_t)buffer_base & ~2047) + 2048); if( buffer_base == NULL ) { fprintf( stderr, "libdvdread: DVDDiscId, failed to " @@ -1100,7 +1100,7 @@ int DVDISOVolumeInfo( dvd_reader_t *dvd, } buffer_base = malloc( DVD_VIDEO_LB_LEN + 2048 ); - buffer = (unsigned char *)(((int)buffer_base & ~2047) + 2048); + buffer = (unsigned char *)(((uintptr_t)buffer_base & ~2047) + 2048); if( buffer_base == NULL ) { fprintf( stderr, "libdvdread: DVDISOVolumeInfo, failed to " |