From: hkuang Date: Tue, 9 Dec 2014 22:32:48 +0000 (-0800) Subject: Fix clang ioc warning due to NULL src_mi pointer. X-Git-Tag: v1.4.0~405^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4eee74d6ed74a29bfd03c5d79bae2ab157944137;p=libvpx Fix clang ioc warning due to NULL src_mi pointer. The warning only happens in VP9 encoder's first pass due to src_mi is not set up yet. But it will not fail the encoder as left_mi and above_mi are not used in the first_pass and they will be set up again in the second pass. Change-Id: I12dffcd5fb1002b2b2dabb083c8726650e4b5f08 --- diff --git a/vp9/common/vp9_onyxc_int.h b/vp9/common/vp9_onyxc_int.h index ed56bed1a..c01205567 100644 --- a/vp9/common/vp9_onyxc_int.h +++ b/vp9/common/vp9_onyxc_int.h @@ -311,7 +311,7 @@ static INLINE void set_mi_row_col(MACROBLOCKD *xd, const TileInfo *const tile, xd->left_available = (mi_col > tile->mi_col_start); if (xd->up_available) { xd->above_mi = xd->mi[-xd->mi_stride].src_mi; - xd->above_mbmi = &xd->above_mi->mbmi;; + xd->above_mbmi = xd->above_mi ? &xd->above_mi->mbmi : NULL; } else { xd->above_mi = NULL; xd->above_mbmi = NULL; @@ -319,7 +319,7 @@ static INLINE void set_mi_row_col(MACROBLOCKD *xd, const TileInfo *const tile, if (xd->left_available) { xd->left_mi = xd->mi[-1].src_mi; - xd->left_mbmi = &xd->left_mi->mbmi;; + xd->left_mbmi = xd->left_mi ? &xd->left_mi->mbmi : NULL; } else { xd->left_mi = NULL; xd->left_mbmi = NULL;