Fix various compiler and valgrind warnings, including:
- compare CString::find result against CString::npos, not -1
- use CString::size_type to hold string indices, not int
- fix other signed vs unsigned comparisons as well
- parentheses in expressions with mixed and/or operators
- braces around ifs containing other ifs and elses
- make sure variables are initialized before using
- #pragma warning is MSVC-specific
- fix an invalid printf format string
- string literals are const
git-svn-id: https://openitg.svn.sourceforge.net/svnroot/openitg/branches/dev@865
83fadc84-e282-4d84-a09a-
c4228d6ae7e5