From bd07b274a2bdbb1accf0d808c1c6a774c95d10db Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Thu, 14 Jul 2016 16:35:38 -0700 Subject: [PATCH 15/15] 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 wibrown@redhat.com (Thanks, William!) (cherry picked from commit 7c9853e07a85db3b46cd1eb6eacdacf3f17c39a0) --- ldap/servers/slapd/attrsyntax.c | 4 ---- ldap/servers/slapd/detach.c | 2 +- ldap/systools/idsktune.c | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/ldap/servers/slapd/attrsyntax.c b/ldap/servers/slapd/attrsyntax.c index 8b2a77a..aec6d21 100644 --- a/ldap/servers/slapd/attrsyntax.c +++ b/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; diff --git a/ldap/servers/slapd/detach.c b/ldap/servers/slapd/detach.c index b055a5c..54c6028 100644 --- a/ldap/servers/slapd/detach.c +++ b/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; } /* diff --git a/ldap/systools/idsktune.c b/ldap/systools/idsktune.c index ad6a39e..4c96529 100644 --- a/ldap/systools/idsktune.c +++ b/ldap/systools/idsktune.c @@ -11,8 +11,6 @@ # include #endif -#define _GNU_SOURCE - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * Don't forget to update build_date when the patch sets are updated. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ -- 2.4.11