Переглянути джерело

Ticket #48919 - Compiler warnings while building 389-ds-base on RHEL7

Description: Fixing additional complier warnings.
1. ldap/servers/slapd/attrsyntax.c
   attr_syntax_force_to_delete(struct asyntaxinfo *asip, void *arg)
   This function does not care the attr_syntax_enum_flaginfo.
2. ldap/servers/slapd/detach.c
   Let detach use the rc which must be 0 (success).
3. ldap/systools/idsktune.c
   Removing #define _GNU_SOURCE from idsktune.c.
   The macro is defined in config.h generated by configure.
     $ egrep _GNU_SOURCE config.h
     #define _GNU_SOURCE 1

https://fedorahosted.org/389/ticket/48919

Reviewed by [email protected] (Thanks, William!)
Noriko Hosoi 9 роки тому
батько
коміт
7c9853e07a

+ 0 - 4
ldap/servers/slapd/attrsyntax.c

@@ -1390,11 +1390,7 @@ attr_syntax_delete_if_not_flagged(struct asyntaxinfo *asip, void *arg)
 static int
 attr_syntax_force_to_delete(struct asyntaxinfo *asip, void *arg)
 {
-	struct attr_syntax_enum_flaginfo	*fi;
-
 	PR_ASSERT( asip != NULL );
-	fi = (struct attr_syntax_enum_flaginfo *)arg;
-	PR_ASSERT( fi != NULL );
 
 	attr_syntax_delete_no_lock( asip, PR_FALSE, 0 );
 	return ATTR_SYNTAX_ENUM_REMOVE;

+ 1 - 1
ldap/servers/slapd/detach.c

@@ -133,7 +133,7 @@ detach( int slapd_exemode, int importexport_encrypt,
 	}
 
 	(void) SIGNAL( SIGPIPE, SIG_IGN );
-	return 0;
+	return rc;
 }
 
 /*

+ 0 - 2
ldap/systools/idsktune.c

@@ -11,8 +11,6 @@
 #  include <config.h>
 #endif
 
-#define _GNU_SOURCE
-
 /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  *    Don't forget to update build_date when the patch sets are updated. 
  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */