Fix most of the following classes of warnings in the ToolTalk libraries:

- Const strings referenced by non-const variables.
- Incorrect format specifers for printing addresses
- Unused variables
- Signed comparison to unsigned

Also fix an incorrect enumeration value in a switch statement.
This commit is contained in:
Chris Wareham
2012-08-14 11:49:53 +01:00
committed by Jon Trulson
parent d6b6353f95
commit e738704385
29 changed files with 51 additions and 57 deletions

View File

@@ -1659,7 +1659,9 @@ _ttdt_posix_cb(
char *categoryName, *variable, *value;
int category, i;
struct utsname names;
#if defined(OPT_SYSINFO)
char buf[ SYS_NMLN ];
#endif
case TTDT_SET_LOCALE:
return _ttDtGetLocaleCB( msg, pat, (void *)_ttDtApplyLocale, 0 );
case TTDT_GET_LOCALE:

View File

@@ -127,7 +127,7 @@ _TttkList2Free::_TttkList2Free(
if (_items == 0) {
_max = 0;
}
for (int i = 0; i < _max; i++) {
for (unsigned int i = 0; i < _max; i++) {
_items[ i ] = new _TttkItem2Free();
if (_items[ i ] == 0) {
_destruct();
@@ -188,7 +188,7 @@ _TttkList2Free::operator +=(
void
_TttkList2Free::flush()
{
for (int i = 0; i < _num; i++) {
for (unsigned int i = 0; i < _num; i++) {
_item( i ) = (caddr_t)0;
}
}
@@ -200,7 +200,7 @@ _TttkList2Free::_destruct()
#ifdef OPT_VECNEW
delete [] _items;
#else
for (int i = 0; i < _max; i++) {
for (unsigned int i = 0; i < _max; i++) {
if (_items[ i ] != 0) {
delete _items[ i ];
_items[ i ] = 0;