static long lx_cap_update_priv(void) { const int lx_cap_mapping[4] = { 0, 0, 0 }; int i = 63; /* enabling the below line disables the warning */ //int cap_set = i == 0; lx_cap_mapping[i]; } /home/gk/src/smatch/smatch: a.c:8 lx_cap_update_priv() error: buffer overflow 'lx_cap_mapping' 4 <= 63 Distilled down from some real code, obviously, but it seems odd that just *looking* at "i" means smatch can't figure out its max value? thanks john