In some programs I like to have something like this to catch potential bugs:
int abs_s(int x) {
assert(x != INT_MIN);
return (x >= 0) ? x : -x;
}