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

Diego Biurrun diego at biurrun.de
Thu Jan 2 20:13:42 CET 2014


On Sun, Dec 29, 2013 at 04:38:33PM +0100, Jean-Baptiste Kempf wrote:
> Well, the issue with ssize_t is that the MSVC support is extremely weak
> for it, even in very recent versions...

Even in the "yay, we can do C99 now" 2013 version?

> 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);


More information about the libdvdnav-devel mailing list