yes you are clearly right  this is unsigned  and i missed the warning  because i am an   idiot   and did not have enable werror  now  the part that confuse me  sql column notfound is defined somewhere to be  xf and used  only  here afaict  i try  unsuccessfully apparently  to follow the code and concluded that that thing was populated using ultimately findcolumn some of which return which is the only value that seems to be possibly put there that  could  match  xf module some sign extension by the compiler when promoting  xf 