diff --git a/wmail/configure.in b/wmail/configure.in index 84d2ded..7054c52 100644 --- a/wmail/configure.in +++ b/wmail/configure.in @@ -39,6 +39,7 @@ AC_SUBST(X_LIBRARY_PATH) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST +AC_TYPE_SIZE_T dnl Checks for library functions. AC_FUNC_FNMATCH diff --git a/wmail/src/common.c b/wmail/src/common.c index f479389..c3bb506 100644 --- a/wmail/src/common.c +++ b/wmail/src/common.c @@ -78,8 +78,8 @@ void WARNING( const char *fmt, ... ) char *MakePathName( const char *dir, const char *file ) { char *fullName; - int len1 = strlen( dir ); - int len2 = strlen( file ); + size_t len1 = strlen( dir ); + size_t len2 = strlen( file ); if( dir[len1-1] != '/' ) fullName = malloc( len1 + len2 + 2 ); diff --git a/wmail/src/config.c b/wmail/src/config.c index 7671f15..b58b847 100644 --- a/wmail/src/config.c +++ b/wmail/src/config.c @@ -126,7 +126,7 @@ static enumList_t tickerEnum[] = static bool Tokenize( const char *line, const char **id, const char **value ) { - int len; + size_t len; const char *token1, *token2; if( line != NULL ) @@ -270,7 +270,7 @@ void ReadConfigFile( bool resetConfigStrings ) for( ; !feof( f ); ++line ) { const char *id, *value; - unsigned int len; + size_t len; if( fgets( buf, 1024, f ) == NULL ) break; diff --git a/wmail/src/wmail.c b/wmail/src/wmail.c index 3c3fca4..157c389 100644 --- a/wmail/src/wmail.c +++ b/wmail/src/wmail.c @@ -529,7 +529,7 @@ static void WriteChecksumFile( bool writeAll ) static void UpdateChecksum( unsigned long *checksum, const char *buf ) { if( buf != NULL ) { - unsigned int i, len = strlen( buf ); + size_t i, len = strlen( buf ); for( i = 0; i < len; ++i ) *checksum += buf[i] << (( i % sizeof(long) ) * 8 ); @@ -919,7 +919,7 @@ static char *ParseFromField( char *buf ) char *addressName; char *atChar = NULL; char *c; - int maxLen = strlen( buf ) + 1; + size_t maxLen = strlen( buf ) + 1; char *comment; if(( fullName = calloc( maxLen, sizeof *fullName )) == NULL ) @@ -1088,7 +1088,7 @@ static char *ParseFromField( char *buf ) static bool SkipSender( char *address ) { char **skipName; - int len = strlen( address ); + size_t len = strlen( address ); // remove trailing '\n' got from fgets if( address[len-1] == '\n' )