Just use "int" for return codes instead of int8_t
Ensure that the error message has leading tabs, too.

Just copy them over from the input.  This means that the error
message is lined up with the text we're complaining about
use the correct struct entries for comparisons
Don't convert attributes of incompatible type
Assume that the permissions are correct
We might have a cast, too
Allow comparisons between integers of different size