i = 0;
moreEntries = getchar();
while ( moreEntries != EOF && moreEntries != '\n' ) {
- if ( i < sizeof(buf) - 1 ) {
+ if ( i < (int)sizeof(buf) - 1 ) {
buf[i] = moreEntries;
i++;
}
#include <sys/types.h>
#include <ac/stdlib.h>
+#include <ac/string.h> /* get memcmp() */
#ifdef HAVE_UUID_TO_STR
# include <sys/uuid.h>
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;
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
*/
return -1;
- } else if ( len >= sizeof( vbuf_ ) ) {
+ } else if ( len >= (int)sizeof( vbuf_ ) ) {
/*
* C99: snprintf returns the required size
*/
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 );
#include <stdio.h>
+#include <ac/string.h>
#include <ac/socket.h>
#define SLAPD_TOOLS