Commit 5d61b609 authored by James Zern's avatar James Zern
Browse files

get_min_tx_size: disable -Warray-bounds

this warning is covered by an assert and other runtime detection.
expanding the array, adding a conditional or converting the type to int
are less desirable.


Change-Id: Idb6a1dec5f17db85a0e9c1d0ee372e701f4e1aa4
parent fe06cb72
......@@ -947,10 +947,20 @@ static INLINE void av1_zero_left_context(MACROBLOCKD *const xd) {
// Disable array-bounds checks as the TX_SIZE enum contains values larger than
// TX_SIZES_ALL (TX_INVALID) which make extending the array as a workaround
// infeasible. The assert is enough for static analysis and this or other tools
// asan, valgrind would catch oob access at runtime.
#if defined(__GNUC__) && __GNUC__ >= 4
#pragma GCC diagnostic ignored "-Warray-bounds"
static INLINE TX_SIZE get_min_tx_size(TX_SIZE tx_size) {
assert(tx_size < TX_SIZES_ALL);
return txsize_sqr_map[tx_size];
#if defined(__GNUC__) && __GNUC__ >= 4
#pragma GCC diagnostic warning "-Warray-bounds"
static INLINE void set_txfm_ctx(TXFM_CONTEXT *txfm_ctx, uint8_t txs, int len) {
int i;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment