ITS#1732 signed/unsigned integers

This commit is contained in:
Howard Chu 2002-04-11 08:46:34 +00:00
parent 98df4006b1
commit d4465e376f
4 changed files with 4 additions and 4 deletions

View file

@ -31,7 +31,7 @@ static void cont_alloc( Datum *cont, Datum *key )
static void cont_id( Datum *cont, ID id )
{
int i;
unsigned int i;
for( i=1; i <= sizeof(id); i++) {
((unsigned char *)cont->dptr)[i] = (unsigned char)(id & 0xFF);

View file

@ -197,7 +197,7 @@ meta_back_search(
for ( i = 0, lsc = lc->conns; lsc[ 0 ] != NULL; ++i, ++lsc ) {
char *realbase = ( char * )base->bv_val;
int realscope = scope;
int suffixlen;
ber_len_t suffixlen;
char *mapped_filter, **mapped_attrs;
if ( lsc[ 0 ]->candidate != META_CANDIDATE ) {

View file

@ -166,7 +166,7 @@ int module_load(const char* file_name, int argc, char *argv[])
return rc;
}
if (rc >= (sizeof(module_regtable) / sizeof(struct module_regtable_t))
if (rc >= (int)(sizeof(module_regtable) / sizeof(struct module_regtable_t))
|| module_regtable[rc].proc == NULL)
{
#ifdef NEW_LOGGING

View file

@ -45,7 +45,7 @@ static char *const err2text[SLAP_SCHERR_LAST+1] = {
char *
scherr2str(int code)
{
if ( code < 0 || code >= (sizeof(err2text)/sizeof(char *)) ) {
if ( code < 0 || code >= (int)(sizeof(err2text)/sizeof(char *)) ) {
return "Unknown error";
} else {
return err2text[code];