diff --git a/servers/slapd/schema.c b/servers/slapd/schema.c
index a200bd2fddfbb26e6865c20c49ec54f9119e3876..9ca2ef81d3ca95146b20a30f7328433f2b68fd64 100644
--- a/servers/slapd/schema.c
+++ b/servers/slapd/schema.c
@@ -255,7 +255,6 @@ oc_create_required(
 )
 {
 	char		**attrs1;
-	int		nattrs;
 	AttributeType	*sat;
 	AttributeType	**satp;
 	int		i;
@@ -295,10 +294,7 @@ oc_create_allowed(
 )
 {
 	char		**attrs1;
-	int		nattrs;
 	AttributeType	*sat;
-	AttributeType	**satp;
-	int		i;
 
 	if ( attrs ) {
 		attrs1 = attrs;