Commit 03cb72be authored by gnosygnu's avatar gnosygnu

Resolve minor compiler warnings

parent 866b12ec
...@@ -753,7 +753,6 @@ static vobu_admap_t* dvdnav_admap_get(dvdnav_t *this, dvd_state_t *state, ...@@ -753,7 +753,6 @@ static vobu_admap_t* dvdnav_admap_get(dvdnav_t *this, dvd_state_t *state,
/* Get a tmap, tmap_len and tmap_interval */ /* Get a tmap, tmap_len and tmap_interval */
static vts_tmap_t* dvdnav_tmap_get(dvdnav_t *this, dvd_state_t *state, static vts_tmap_t* dvdnav_tmap_get(dvdnav_t *this, dvd_state_t *state,
int32_t *tmap_len, int32_t *tmap_interval) { int32_t *tmap_len, int32_t *tmap_interval) {
int32_t vts_idx = 0;
int32_t domain; int32_t domain;
ifo_handle_t *ifo = NULL; ifo_handle_t *ifo = NULL;
vts_tmapt_t *tmapt = NULL; vts_tmapt_t *tmapt = NULL;
...@@ -762,7 +761,6 @@ static vts_tmap_t* dvdnav_tmap_get(dvdnav_t *this, dvd_state_t *state, ...@@ -762,7 +761,6 @@ static vts_tmap_t* dvdnav_tmap_get(dvdnav_t *this, dvd_state_t *state,
vts_tmap_t *tmap = NULL; vts_tmap_t *tmap = NULL;
int32_t result = 0; int32_t result = 0;
vts_idx = state->vtsN;
domain = state->domain; domain = state->domain;
switch(domain) { switch(domain) {
case DVD_DOMAIN_FirstPlay: case DVD_DOMAIN_FirstPlay:
...@@ -870,8 +868,10 @@ static int32_t dvdnav_admap_search(vobu_admap_t *admap, uint32_t admap_len, ...@@ -870,8 +868,10 @@ static int32_t dvdnav_admap_search(vobu_admap_t *admap, uint32_t admap_len,
/* need to add 1 when prv_len == 3 (cur_len shoud go to 2, not 1) */ /* need to add 1 when prv_len == 3 (cur_len shoud go to 2, not 1) */
if (prv_len % 2 == 1) ++cur_len; if (prv_len % 2 == 1) ++cur_len;
cur_idx = prv_pos + (cur_len * adj); cur_idx = prv_pos + (cur_len * adj);
if (cur_idx < 0) cur_idx = 0; if (cur_idx < 0)
else if (cur_idx >= admap_len) cur_idx = admap_len - 1; cur_idx = 0;
else if (cur_idx >= (int32_t)admap_len)
cur_idx = admap_len - 1;
cur_sector = admap->vobu_start_sectors[cur_idx]; cur_sector = admap->vobu_start_sectors[cur_idx];
if (find_sector < cur_sector) adj = -1; if (find_sector < cur_sector) adj = -1;
...@@ -908,8 +908,10 @@ static int32_t dvdnav_tmap_search(vts_tmap_t *tmap, uint32_t tmap_len, ...@@ -908,8 +908,10 @@ static int32_t dvdnav_tmap_search(vts_tmap_t *tmap, uint32_t tmap_len,
/* need to add 1 when prv_len == 3 (cur_len shoud go to 2, not 1) */ /* need to add 1 when prv_len == 3 (cur_len shoud go to 2, not 1) */
if (prv_len % 2 == 1) ++cur_len; if (prv_len % 2 == 1) ++cur_len;
cur_idx = prv_pos + (cur_len * adj); cur_idx = prv_pos + (cur_len * adj);
if (cur_idx < 0) cur_idx = 0; if (cur_idx < 0)
else if (cur_idx >= tmap_len) cur_idx = tmap_len - 1; cur_idx = 0;
else if (cur_idx >= (int32_t)tmap_len)
cur_idx = tmap_len - 1;
cur_sector = 0; cur_sector = 0;
result = dvdnav_tmap_get_entry(tmap, tmap_len, cur_idx, &cur_sector); result = dvdnav_tmap_get_entry(tmap, tmap_len, cur_idx, &cur_sector);
if (!result) return 0; if (!result) return 0;
...@@ -1039,7 +1041,7 @@ static int32_t dvdnav_admap_interpolate_vobu(dvdnav_jump_args_t *args, ...@@ -1039,7 +1041,7 @@ static int32_t dvdnav_admap_interpolate_vobu(dvdnav_jump_args_t *args,
/* HACK: need to add +1, or else will land too soon (not sure why) */ /* HACK: need to add +1, or else will land too soon (not sure why) */
vobu_adj++; vobu_adj++;
vobu_idx = bgn->vobu_idx + vobu_adj; vobu_idx = bgn->vobu_idx + vobu_adj;
if (vobu_idx >= args->admap_len) { if ((int32_t)vobu_idx >= args->admap_len) {
fprintf(MSG_OUT, "admap_interpolate: vobu_idx >= admap_len"); fprintf(MSG_OUT, "admap_interpolate: vobu_idx >= admap_len");
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment