]> git.sur5r.net Git - openldap/commitdiff
silence (a couple of) warnings
authorPierangelo Masarati <ando@openldap.org>
Fri, 14 Jan 2005 11:50:24 +0000 (11:50 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 14 Jan 2005 11:50:24 +0000 (11:50 +0000)
servers/slapd/sl_malloc.c

index 00136e84b1fcb3112f54dc13b589d5723a82910a..aa143ed070372973d1cb5310bdda87ed9e654f70 100644 (file)
@@ -300,7 +300,7 @@ slap_sl_malloc(
                                }
                                so_right = LDAP_LIST_FIRST(&sh->sh_sopool);
                                LDAP_LIST_REMOVE(so_right, so_link);
-                               so_right->so_ptr = so_left->so_ptr + (1 << j);
+                               so_right->so_ptr = (void *)((char *)so_left->so_ptr + (1 << j));
                                if (j == order + 1) {
                                        ptr = so_left->so_ptr;
                                        diff = (unsigned long)((char*)ptr -
@@ -326,6 +326,9 @@ slap_sl_malloc(
                        return (void*)ch_malloc(size);
                }
        }
+
+       /* FIXME: missing return; guessing... */
+       return NULL;
 }
 
 void *
@@ -495,7 +498,7 @@ slap_sl_free(void *ptr, void *ctx)
                                        while (so) {
                                                if ((char*)so->so_ptr == (char*)tmpp) {
                                                        LDAP_LIST_REMOVE(so, so_link);
-                                               } else if ((char*)tmpp == so->so_ptr + order_size) {
+                                               } else if ((char*)tmpp == (char *)so->so_ptr + order_size) {
                                                        LDAP_LIST_REMOVE(so, so_link);
                                                        tmpp = so->so_ptr;
                                                        break;