[libdvdnav-devel] [PATCH 1/2] dvd_reader: Adjust variable type to avoid warning

Jean-Baptiste Kempf jb at videolan.org
Sun Dec 29 16:38:33 CET 2013


Well, the issue with ssize_t is that the MSVC support is extremely weak
for it, even in very recent versions...

On 01 Dec, Diego Biurrun wrote :
> src/dvd_reader.c:1384:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
> ---
>  src/dvd_reader.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/dvd_reader.c b/src/dvd_reader.c
> index 64105ee..30364db 100644
> --- a/src/dvd_reader.c
> +++ b/src/dvd_reader.c
> @@ -1369,7 +1369,7 @@ int DVDDiscID( dvd_reader_t *dvd, unsigned char *discid )
>      dvd_file_t *dvd_file = DVDOpenFile( dvd, title, DVD_READ_INFO_FILE );
>      if( dvd_file != NULL ) {
>        ssize_t bytes_read;
> -      size_t file_size = dvd_file->filesize * DVD_VIDEO_LB_LEN;
> +      ssize_t file_size = dvd_file->filesize * DVD_VIDEO_LB_LEN;
>        char *buffer_base = malloc( file_size + 2048 );
>        char *buffer = (char *)(((uintptr_t)buffer_base & ~((uintptr_t)2047)) + 2048);
>  
> -- 
> 1.8.3.2
> 
> _______________________________________________
> libdvdnav-devel mailing list
> libdvdnav-devel at videolan.org
> https://mailman.videolan.org/listinfo/libdvdnav-devel

-- 
With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device


More information about the libdvdnav-devel mailing list