Fix warnings in Mac build

Minor but annoying warnings from the mac build fixed.
 * Incorrect duplication of header causing moc build rule duplication
in generated makefile
 * you aren’t supposed to use char as an array type, probably because
it can be a signed type in some compilers. Negative array indexes are
problematic.