From 87a38d77ac899d8b6e21c7bcaeb8d4b74ed65341 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Matthias=20Dieter=20Walln=C3=B6fer?= Date: Wed, 8 Jun 2011 18:55:23 +0200 Subject: [PATCH] s4:dsdb/schema_convert_to_ol.c - quiet enum warning Introduce a error message when choosing wrong targets. Reviewed-by: Tridge --- source4/dsdb/schema/schema_convert_to_ol.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source4/dsdb/schema/schema_convert_to_ol.c b/source4/dsdb/schema/schema_convert_to_ol.c index 77a9b1f291c..3d910da967a 100644 --- a/source4/dsdb/schema/schema_convert_to_ol.c +++ b/source4/dsdb/schema/schema_convert_to_ol.c @@ -145,6 +145,9 @@ static char *print_schema_recursive(char *append_to_string, struct dsdb_schema * case TARGET_FEDORA_DS: out = talloc_asprintf_append(out, "objectClasses: %s\n", schema_entry); break; + default: + DEBUG(0, ("Wrong type of target!\n")); + return NULL; } talloc_free(mem_ctx); } while (0); @@ -274,6 +277,9 @@ char *dsdb_convert_schema_to_openldap(struct ldb_context *ldb, char *target_str, case TARGET_FEDORA_DS: out = talloc_strdup(mem_ctx, "dn: cn=schema\n"); break; + default: + DEBUG(0, ("Wrong type of target!\n")); + return NULL; } for (attribute=schema->attributes; attribute; attribute = attribute->next) { @@ -350,6 +356,9 @@ char *dsdb_convert_schema_to_openldap(struct ldb_context *ldb, char *target_str, case TARGET_FEDORA_DS: out = talloc_asprintf_append(out, "attributeTypes: %s\n", schema_entry); break; + default: + DEBUG(0, ("Wrong type of target!\n")); + return NULL; } } -- 2.11.4.GIT