summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorritsuka <[email protected]>2015-06-03 05:40:39 +0000
committerritsuka <[email protected]>2015-06-03 05:40:39 +0000
commit63beafc855bee58a0d47f2a9f2feed250084559e (patch)
tree79bdc896a697b6f652eb7a16a2be6355987f61dd
parentd456488972ee764d1fcfc3e1c58ca0c009e2ef61 (diff)
Fix three dead assignment found by the clang static analyzer, including the validation of the end chapter range.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7264 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--test/test.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/test.c b/test/test.c
index ec031f7bd..25cea9458 100644
--- a/test/test.c
+++ b/test/test.c
@@ -754,7 +754,6 @@ static int HandleEvents(hb_handle_t * h, hb_dict_t *preset_dict)
}
if( title_set->feature == title->index )
{
- main_feature_time = title_time;
main_feature_pos = i;
main_feature_idx = title->index;
break;
@@ -3653,8 +3652,7 @@ PrepareJob(hb_handle_t *h, hb_title_t *title, hb_dict_t *preset_dict)
range_type = "chapter";
int chapter_count = hb_list_count(title->list_chapter);
range_start = MAX(1, chapter_start);
- range_end = MIN(chapter_count, chapter_end);
- range_end = MAX(chapter_start, chapter_end);
+ range_end = MAX(chapter_start, MIN(chapter_count, chapter_end));
}
else if (start_at_preview)
{
@@ -3706,11 +3704,11 @@ PrepareJob(hb_handle_t *h, hb_title_t *title, hb_dict_t *preset_dict)
hb_dict_t *audios_dict = hb_dict_get(job_dict, "Audio");
hb_value_array_t * audio_array = hb_dict_get(audios_dict, "AudioList");
hb_dict_t *audio_dict;
- int track_count = hb_value_array_len(audio_array);
/* Grab audio tracks */
if (atracks != NULL)
{
+ int track_count;
int ii;
if (atracks[0] != NULL && strcasecmp("none", atracks[0]))
{