]> granicus.if.org Git - libvpx/commitdiff
video_source.h,ReallocImage: quiet implicit conv warning
authorJames Zern <jzern@google.com>
Sat, 6 Nov 2021 17:42:37 +0000 (10:42 -0700)
committerJames Zern <jzern@google.com>
Mon, 8 Nov 2021 21:43:09 +0000 (13:43 -0800)
with -fsanitize=undefined

test/video_source.h:194:33: runtime error: implicit conversion from type
'int' of value -32 (32-bit, signed) to type 'unsigned int' changed the
value to 4294967264 (32-bit, unsigned)

Change-Id: I92013086d517fecf01c9e4cdfe6737b8ce733a1f

test/video_source.h

index e9340f21e9eac945a7300082d63f4a890bd41e8e..2ba3f64211b7e2516b4da29fbb1d5a6c206b0930 100644 (file)
@@ -191,7 +191,7 @@ class DummyVideoSource : public VideoSource {
   void ReallocImage() {
     vpx_img_free(img_);
     img_ = vpx_img_alloc(NULL, format_, width_, height_, 32);
-    raw_sz_ = ((img_->w + 31) & ~31) * img_->h * img_->bps / 8;
+    raw_sz_ = ((img_->w + 31) & ~31u) * img_->h * img_->bps / 8;
   }
 
   vpx_image_t *img_;