Minor fixes

Fixed integer vs unsigned integer comparison in .cpp test source and
trailing whitespaces in source code