fix compiler warnings and size mismatches between loop iterator type and loop limit type
fix compiler warning about unnamed typedef struct. the whole typedef struct is unnecessary in C++ but I went along with the general C look of the file
fix more compiler warnings about unused locals and indexing off the end of arrays
Merge pull request #38 from nsd20463/master

fix some mismatched types in ccspi.cc, and some compiler warnings elsewhere