squash some signed/unsigned comparison warnings

Change-Id: Ifc64cf990ae04d77934da3324d0afb3993f061e7
diff --git a/args.c b/args.c
index 7b2cc3a..37ba778 100644
--- a/args.c
+++ b/args.c
@@ -57,7 +57,7 @@
     }
     else if (def->long_name)
     {
-        int name_len = strlen(def->long_name);
+        const size_t name_len = strlen(def->long_name);
 
         if (strlen(arg.argv[0]) >= name_len + 2
             && arg.argv[0][1] == '-'
diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c
index 003babb..11d0e38 100644
--- a/vp8/decoder/decodframe.c
+++ b/vp8/decoder/decodframe.c
@@ -484,7 +484,8 @@
                                 const unsigned char* token_part_sizes)
 {
     vp8_reader *bool_decoder = &pbi->bc2;
-    int fragment_idx, partition_idx;
+    unsigned int partition_idx;
+    int fragment_idx;
     int num_token_partitions;
     const unsigned char *first_fragment_end = pbi->fragments[0] +
                                           pbi->fragment_sizes[0];
diff --git a/vp8/encoder/bitstream.c b/vp8/encoder/bitstream.c
index 2a5502f..404bd8d 100644
--- a/vp8/encoder/bitstream.c
+++ b/vp8/encoder/bitstream.c
@@ -1206,7 +1206,7 @@
     {
         for (j=0; j < PREV_COEF_CONTEXTS; ++j)
         {
-            const int tmp = out[i];
+            const unsigned int tmp = out[i];
             out[i] += probs[j][i];
             /* check for wrap */
             if (out[i] < tmp)
diff --git a/vp8/encoder/lookahead.c b/vp8/encoder/lookahead.c
index b92e82b..3e582e3 100644
--- a/vp8/encoder/lookahead.c
+++ b/vp8/encoder/lookahead.c
@@ -48,7 +48,7 @@
     {
         if(ctx->buf)
         {
-            int i;
+            unsigned int i;
 
             for(i = 0; i < ctx->max_sz; i++)
                 vp8_yv12_de_alloc_frame_buffer(&ctx->buf[i].img);
@@ -65,7 +65,7 @@
                    unsigned int depth)
 {
     struct lookahead_ctx *ctx = NULL;
-    int i;
+    unsigned int i;
 
     /* Clamp the lookahead queue depth */
     if(depth < 1)
@@ -188,7 +188,7 @@
 
 struct lookahead_entry*
 vp8_lookahead_peek(struct lookahead_ctx *ctx,
-                   int                   index)
+                   unsigned int          index)
 {
     struct lookahead_entry* buf = NULL;
 
diff --git a/vp8/encoder/lookahead.h b/vp8/encoder/lookahead.h
index afb3fd4..32bafcd 100644
--- a/vp8/encoder/lookahead.h
+++ b/vp8/encoder/lookahead.h
@@ -92,7 +92,7 @@
  */
 struct lookahead_entry*
 vp8_lookahead_peek(struct lookahead_ctx *ctx,
-                   int                   index);
+                   unsigned int          index);
 
 
 /**\brief Get the number of frames currently in the lookahead queue
diff --git a/vp8/encoder/mcomp.c b/vp8/encoder/mcomp.c
index 9d96383..735af95 100644
--- a/vp8/encoder/mcomp.c
+++ b/vp8/encoder/mcomp.c
@@ -1156,7 +1156,7 @@
     int tot_steps;
     int_mv this_mv;
 
-    int bestsad = INT_MAX;
+    unsigned int bestsad = UINT_MAX;
     int best_site = 0;
     int last_site = 0;
 
@@ -1397,7 +1397,7 @@
     unsigned char *bestaddress;
     int_mv *best_mv = &d->bmi.mv;
     int_mv this_mv;
-    int bestsad = INT_MAX;
+    unsigned int bestsad = UINT_MAX;
     int r, c;
 
     unsigned char *check_here;
@@ -1527,7 +1527,7 @@
     unsigned char *bestaddress;
     int_mv *best_mv = &d->bmi.mv;
     int_mv this_mv;
-    int bestsad = INT_MAX;
+    unsigned int bestsad = UINT_MAX;
     int r, c;
 
     unsigned char *check_here;
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
index 32f0a25..51f1df0 100644
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -1080,10 +1080,10 @@
 
         if (Speed > 6)
         {
-            unsigned int i, sum = 0;
+            unsigned int sum = 0;
             unsigned int total_mbs = cm->MBs;
-            int thresh;
-            int total_skip;
+            int i, thresh;
+            unsigned int total_skip;
 
             int min = 2000;
 
@@ -1513,8 +1513,8 @@
     // Temporal scalabilty
     if (cpi->oxcf.number_of_layers > 1)
     {
-        int i;
-        int prev_layer_frame_rate=0;
+        unsigned int i;
+        double prev_layer_frame_rate=0;
 
         for (i=0; i<cpi->oxcf.number_of_layers; i++)
         {
@@ -3539,7 +3539,7 @@
 
             if (cpi->oxcf.number_of_layers > 1)
             {
-                int i;
+                unsigned int i;
 
                 // Propagate bits saved by dropping the frame to higher layers
                 for (i=cpi->current_layer+1; i<cpi->oxcf.number_of_layers; i++)
@@ -4316,7 +4316,7 @@
 
     if (cpi->oxcf.number_of_layers > 1)
     {
-        int i;
+        unsigned int i;
         for (i=cpi->current_layer+1; i<cpi->oxcf.number_of_layers; i++)
           cpi->layer_context[i].total_byte_count += (*size);
     }
@@ -4427,7 +4427,7 @@
     // Propagate values to higher temporal layers
     if (cpi->oxcf.number_of_layers > 1)
     {
-        int i;
+        unsigned int i;
 
         for (i=cpi->current_layer+1; i<cpi->oxcf.number_of_layers; i++)
         {
diff --git a/vp8/encoder/temporal_filter.c b/vp8/encoder/temporal_filter.c
index b9ade1c..0e82507 100644
--- a/vp8/encoder/temporal_filter.c
+++ b/vp8/encoder/temporal_filter.c
@@ -98,7 +98,7 @@
     unsigned short *count
 )
 {
-    int i, j, k;
+    unsigned int i, j, k;
     int modifier;
     int byte = 0;
 
diff --git a/vpxenc.c b/vpxenc.c
index 2e14f24..3637acb 100644
--- a/vpxenc.c
+++ b/vpxenc.c
@@ -807,7 +807,7 @@
 
     {
         EbmlLoc start;
-        int i;
+        unsigned int i;
 
         glob->cue_pos = ftello(glob->stream);
         Ebml_StartSubElement(glob, &start, Cues);