Fix two compiler warnings.
authorTimothy B. Terriberry <tterribe@xiph.org>
Wed, 24 May 2017 20:08:44 +0000 (13:08 -0700)
committerTimothy B. Terriberry <tterribe@xiph.org>
Wed, 24 May 2017 21:04:19 +0000 (14:04 -0700)
Thanks to Mark Harris for the report.

src/http.c
src/info.c

index 7c88537..dbbdad9 100644 (file)
@@ -3422,6 +3422,7 @@ void *op_url_stream_vcreate_impl(OpusFileCallbacks *_cb,
   proxy_user=NULL;
   proxy_pass=NULL;
   pinfo=NULL;
+  *_pinfo=NULL;
   for(;;){
     ptrdiff_t request;
     request=va_arg(_ap,char *)-(char *)NULL;
@@ -3453,7 +3454,6 @@ void *op_url_stream_vcreate_impl(OpusFileCallbacks *_cb,
   }
   /*If the caller has requested server information, proxy it to a local copy to
      simplify error handling.*/
-  *_pinfo=NULL;
   if(pinfo!=NULL){
     void *ret;
     opus_server_info_init(_info);
index a37733a..2a4f737 100644 (file)
@@ -115,7 +115,7 @@ static int op_tags_ensure_capacity(OpusTags *_tags,size_t _ncomments){
   /*We only support growing.
     Trimming requires cleaning up the allocated strings in the old space, and
      is best handled separately if it's ever needed.*/
-  OP_ASSERT(_ncomments>=cur_ncomments);
+  OP_ASSERT(_ncomments>=(size_t)cur_ncomments);
   comment_lengths=_tags->comment_lengths;
   comment_lengths=(int *)_ogg_realloc(_tags->comment_lengths,size);
   if(OP_UNLIKELY(comment_lengths==NULL))return OP_EFAULT;