[libdvdnav-devel] [DVDnav-discuss] Resolve compiler warning (admap_entries should be unsigned int)

gnosygnu gnosygnu at gmail.com
Sun Aug 17 06:06:39 CEST 2014


Sorry about the reconstructed email, but I wasn't subscribed to this list
beforehand (Thanks Roger for the heads-up)

> On 2014-08-15 07:49, Diego Biurrun wrote:

>> Resolve compiler warning (admap_entries should be unsigned int)

> Hmm, here it is unsigned int ..

>> -    int admap_entries = (admap->last_byte + 1 -
VOBU_ADMAP_SIZE)/VOBU_ADMAP_SIZE;
>> +    uint32_t admap_entries = (admap->last_byte + 1 -
VOBU_ADMAP_SIZE)/VOBU_ADMAP_SIZE;

> .. and here it is uint32_t.

Yeah, my commit message should have said "Resolve compiler warning
(admap_entries should be uint32_t)". My mistake. I don't think there is an
easy way to update git commit messages, but let me know if otherwise.

Also, in case you're curious, I chose uint32_t because admap->last_byte is
also defined as uint32_t. See snippet below from lines 382-385 in
src/dvdread/ifo_types.h. If you feel it should be something else (like
unsigned int?), let me know. My main objective was to get rid of the last
compiler warning, and the change seemed innocuous.

Thanks.

typedef struct {
  uint32_t last_byte;
  uint32_t *vobu_start_sectors;
} ATTRIBUTE_PACKED vobu_admap_t;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/libdvdnav-devel/attachments/20140817/4285c7a8/attachment.html>


More information about the libdvdnav-devel mailing list