Silence gcc warnings (signed vs. unsigned, implicit declarations, unused vars).

This commit is contained in:
Hallvard Furuseth 2003-01-19 15:03:25 +00:00
parent cb61800ac6
commit 6a51371fc5
6 changed files with 8 additions and 5 deletions

View File

@ -729,7 +729,7 @@ getNextPage:
i = 0;
moreEntries = getchar();
while ( moreEntries != EOF && moreEntries != '\n' ) {
if ( i < sizeof(buf) - 1 ) {
if ( i < (int)sizeof(buf) - 1 ) {
buf[i] = moreEntries;
i++;
}

View File

@ -21,6 +21,7 @@
#include <sys/types.h>
#include <ac/stdlib.h>
#include <ac/string.h> /* get memcmp() */
#ifdef HAVE_UUID_TO_STR
# include <sys/uuid.h>

View File

@ -748,7 +748,8 @@ str2anlist( AttributeName *an, char *in, const char *brkstr )
int
ad_define_option( const char *name, const char *fname, int lineno )
{
int i, j, len, optlen;
int i;
unsigned int optlen;
if ( options == &lang_option ) {
options = NULL;

View File

@ -126,7 +126,7 @@ bdb_bt_compare(
c = curkey->data;
#ifdef WORDS_BIGENDIAN
for( i = 0; i < sizeof(ID); i++)
for( i = 0; i < (int)sizeof(ID); i++)
#else
for( i = sizeof(ID)-1; i >= 0; i--)
#endif

View File

@ -444,7 +444,7 @@ suffix_massage_config(
*/
return -1;
} else if ( len >= sizeof( vbuf_ ) ) {
} else if ( len >= (int)sizeof( vbuf_ ) ) {
/*
* C99: snprintf returns the required size
*/
@ -459,7 +459,7 @@ suffix_massage_config(
if ( len == -1 ) {
return -1;
} else if ( len >= sizeof( rbuf_ ) ) {
} else if ( len >= (int)sizeof( rbuf_ ) ) {
rbuf = ch_malloc( len + 1 );
len = snprintf( rbuf, sizeof( rbuf_ ), "%%1%s)%%2",
nrnc->bv_val );

View File

@ -29,6 +29,7 @@
#include <stdio.h>
#include <ac/string.h>
#include <ac/socket.h>
#define SLAPD_TOOLS