Browse Source

Trac Ticket #536 - Clean up compiler warnings for 1.3

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

Description: Cleaning up compiler warnings by:
- declaring config_get_schemamod in proto-slap.h
- putting parentheses around assignment
- explicitly casting to discard 'const'
Noriko Hosoi 13 years ago
parent
commit
dc33f18501
3 changed files with 5 additions and 3 deletions
  1. 1 1
      ldap/servers/slapd/attrsyntax.c
  2. 2 2
      ldap/servers/slapd/dse.c
  3. 2 0
      ldap/servers/slapd/proto-slap.h

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

@@ -823,7 +823,7 @@ slapi_attr_is_dn_syntax_type(char *type)
 	asi = attr_syntax_get_by_name(type);
 
 	if (asi && asi->asi_plugin) { /* If not set, there is no way to get the info */
-		if (syntaxoid = asi->asi_plugin->plg_syntax_oid) {
+		if ((syntaxoid = asi->asi_plugin->plg_syntax_oid)) {
 			dn_syntax = ((0 == strcmp(syntaxoid, NAMEANDOPTIONALUID_SYNTAX_OID))
 						 || (0 == strcmp(syntaxoid, DN_SYNTAX_OID)));
 		}

+ 2 - 2
ldap/servers/slapd/dse.c

@@ -704,9 +704,9 @@ dse_read_one_file(struct dse *pdse, const char *filename, Slapi_PBlock *pb,
     if ( (NULL != pdse) && (NULL != filename) )
     {
         /* check if the "real" file exists and cam be used, if not try tmp as backup */
-	rc = dse_check_file(filename, pdse->dse_tmpfile);
+	rc = dse_check_file((char *)filename, pdse->dse_tmpfile);
 	if (!rc) 
-	    rc = dse_check_file(filename, pdse->dse_fileback);
+	    rc = dse_check_file((char *)filename, pdse->dse_fileback);
 
         if ( (rc = PR_GetFileInfo( filename, &prfinfo )) != PR_SUCCESS )
         {

+ 2 - 0
ldap/servers/slapd/proto-slap.h

@@ -551,6 +551,8 @@ size_t config_get_ndn_cache_size();
 int config_get_ndn_cache_enabled();
 char *config_get_allowed_sasl_mechs();
 int config_set_allowed_sasl_mechs(const char *attrname, char *value, char *errorbuf, int apply);
+int config_get_schemamod();
+
 PLHashNumber hashNocaseString(const void *key);
 PRIntn hashNocaseCompare(const void *v1, const void *v2);