diff options
author | Torsten Jager <t.jager@gmx.de> | 2014-11-06 15:08:15 +0100 |
---|---|---|
committer | Torsten Jager <t.jager@gmx.de> | 2014-11-06 15:08:15 +0100 |
commit | b9d648a31218194e9aea8a07d84a9172705b9e66 (patch) | |
tree | 4472fe2d3e0c185f828e344108ac067edd713b3f | |
parent | f15fe88f505e8632f9ce093a05cb4b83c54fffbf (diff) | |
download | xine-lib-b9d648a31218194e9aea8a07d84a9172705b9e66.tar.gz xine-lib-b9d648a31218194e9aea8a07d84a9172705b9e66.tar.bz2 |
libdvdnav: silence warnings.
-rw-r--r-- | src/input/libdvdnav/dvd_input.c | 5 | ||||
-rw-r--r-- | src/input/libdvdnav/dvd_udf.c | 18 | ||||
-rw-r--r-- | src/input/libdvdnav/md5.c | 9 | ||||
-rw-r--r-- | src/input/libdvdnav/remap.c | 2 |
4 files changed, 21 insertions, 13 deletions
diff --git a/src/input/libdvdnav/dvd_input.c b/src/input/libdvdnav/dvd_input.c index 8eea51412..b2b06d76a 100644 --- a/src/input/libdvdnav/dvd_input.c +++ b/src/input/libdvdnav/dvd_input.c @@ -295,12 +295,13 @@ static int file_read(dvd_input_t dev, void *buffer, int blocks, int flags) { size_t len; ssize_t ret; + char *q = buffer; len = (size_t)blocks * DVD_VIDEO_LB_LEN; while(len > 0) { - ret = read(dev->fd, buffer, len); + ret = read(dev->fd, q, len); if(ret < 0) { /* One of the reads failed, too bad. We won't even bother @@ -319,7 +320,7 @@ static int file_read(dvd_input_t dev, void *buffer, int blocks, int flags) return (int) (bytes / DVD_VIDEO_LB_LEN); } - buffer += ret; + q += ret; len -= ret; } diff --git a/src/input/libdvdnav/dvd_udf.c b/src/input/libdvdnav/dvd_udf.c index 8df1d133d..04ac42853 100644 --- a/src/input/libdvdnav/dvd_udf.c +++ b/src/input/libdvdnav/dvd_udf.c @@ -412,11 +412,16 @@ static int UDFPartition( uint8_t *data, uint16_t *Flags, uint16_t *Number, */ static int UDFLogVolume( uint8_t *data, char *VolumeDescriptor ) { - uint32_t lbsize, MT_L, N_PM; + uint32_t lbsize; +#if 0 + uint32_t MT_L, N_PM; +#endif Unicodedecode(&data[84], 128, VolumeDescriptor); lbsize = GETN4(212); /* should be 2048 */ +#if 0 MT_L = GETN4(264); /* should be 6 */ N_PM = GETN4(268); /* should be 1 */ +#endif if (lbsize != DVD_VIDEO_LB_LEN) return 1; return 0; } @@ -782,7 +787,7 @@ uint32_t UDFFindFile( dvd_reader_t *device, char *filename, uint32_t lbnum; uint16_t TagID; struct Partition partition; - struct AD RootICB, File, ICB; + struct AD RootICB, File, ICB = {0, 0, 0, 0}; char tokenline[ MAX_UDF_FILE_NAME_LEN ]; char *token; uint8_t filetype; @@ -870,13 +875,14 @@ static int UDFGetDescriptor( dvd_reader_t *device, int id, uint32_t lbnum, MVDS_location, MVDS_length; struct avdp_t avdp; uint16_t TagID; - uint32_t lastsector; - int i, terminate; +#if 0 + uint32_t lastsector = 0; + int terminate = 0; +#endif + int i; int desc_found = 0; /* Find Anchor */ - lastsector = 0; lbnum = 256; /* Try #1, prime anchor */ - terminate = 0; if(bufsize < DVD_VIDEO_LB_LEN) { return 0; } diff --git a/src/input/libdvdnav/md5.c b/src/input/libdvdnav/md5.c index 16b7b0690..97429ddd4 100644 --- a/src/input/libdvdnav/md5.c +++ b/src/input/libdvdnav/md5.c @@ -96,7 +96,7 @@ md5_finish_ctx (ctx, resbuf) void *resbuf; { /* Take yet unprocessed bytes into account. */ - md5_uint32 bytes = ctx->buflen; + md5_uint32 bytes = ctx->buflen, temp; size_t pad; /* Now count remaining bytes. */ @@ -108,9 +108,10 @@ md5_finish_ctx (ctx, resbuf) memcpy (&ctx->buffer[bytes], fillbuf, pad); /* Put the 64-bit file length in *bits* at the end of the buffer. */ - *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3); - *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) | - (ctx->total[0] >> 29)); + temp = SWAP (ctx->total[0] << 3); + memcpy (&ctx->buffer[bytes + pad], &temp, 4); + temp = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29)); + memcpy (&ctx->buffer[bytes + pad + 4], &temp, 4); /* Process last bytes. */ md5_process_block (ctx->buffer, bytes + pad + 8, ctx); diff --git a/src/input/libdvdnav/remap.c b/src/input/libdvdnav/remap.c index 42bb8b3dd..e99420787 100644 --- a/src/input/libdvdnav/remap.c +++ b/src/input/libdvdnav/remap.c @@ -148,7 +148,7 @@ static int parseblock(char *buf, int *dom, int *tt, int *pg, long tmp; char *tok; char *epos; - char *marker[]={"domain", "title", "program", "start", "end"}; + const char *marker[]={"domain", "title", "program", "start", "end"}; int st = 0; tok = strtok( buf, " "); while (st < 5) { |