Add compiler flag -Wsign-compare

Also, fix the warnings generated by this flag.

Conflicts:
	examples/aom_cx_set_ref.c

Change-Id: I0451e119c52000aa7c1c55027d53f1da5a02a11f
diff --git a/examples/aom_cx_set_ref.c b/examples/aom_cx_set_ref.c
index 43e8fe0..fdb9739 100644
--- a/examples/aom_cx_set_ref.c
+++ b/examples/aom_cx_set_ref.c
@@ -307,6 +307,7 @@
   const char *height_arg = NULL;
   const char *infile_arg = NULL;
   const char *outfile_arg = NULL;
+  const char *update_frame_num_arg = NULL;
   unsigned int limit = 0;
   exec_name = argv[0];
 
@@ -317,18 +318,21 @@
   height_arg = argv[3];
   infile_arg = argv[4];
   outfile_arg = argv[5];
+  update_frame_num_arg = argv[6];
 
   encoder = get_aom_encoder_by_name(codec_arg);
   if (!encoder) die("Unsupported codec.");
 
-  update_frame_num = atoi(argv[6]);
+  update_frame_num = (unsigned int)strtoul(update_frame_num_arg, NULL, 0);
   // In AV1, the reference buffers (cm->buffer_pool->frame_bufs[i].buf) are
   // allocated while calling aom_codec_encode(), thus, setting reference for
   // 1st frame isn't supported.
-  if (update_frame_num <= 1) die("Couldn't parse frame number '%s'\n", argv[6]);
+  if (update_frame_num <= 1) {
+    die("Couldn't parse frame number '%s'\n", update_frame_num_arg);
+  }
 
   if (argc > 7) {
-    limit = atoi(argv[7]);
+    limit = (unsigned int)strtoul(argv[7], NULL, 0);
     if (update_frame_num > limit)
       die("Update frame number couldn't larger than limit\n");
   }