misc: fixed clang's "unsigned enum expression < 0 always true" warnings, refs #193