[SSSD] [PATCH] Add a default section to a swtich-statement
Sumit Bose
sbose at redhat.com
Wed Jan 9 09:51:34 UTC 2013
Hi,
a switch statement which was introduced with "Remove unhelpful vtable
from sss_cache" has a missing default section which results in a
compiler warning about an uninitialized variable. The attached patch
should fix it.
bye,
Sumit
-------------- next part --------------
From f12b0cc97adc2052bbe1a77366caaa5d0f610652 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose at redhat.com>
Date: Wed, 9 Jan 2013 10:42:29 +0100
Subject: [PATCH] Add a default section to a swtich-statement
Besides adding the missing default this patch suppresses a compiler
warning about ret being uninitialized.
---
src/tools/sss_cache.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/tools/sss_cache.c b/src/tools/sss_cache.c
index 56fcd46..5cced0c 100644
--- a/src/tools/sss_cache.c
+++ b/src/tools/sss_cache.c
@@ -314,6 +314,9 @@ bool invalidate_entries(TALLOC_CTX *ctx, struct sysdb_ctx *sysdb,
type_string = "autofs map";
ret = search_autofsmaps(ctx, sysdb, filter, attrs, &msg_count, &msgs);
break;
+ default:
+ DEBUG(SSSDBG_OP_FAILURE, ("Unknown entry type [%d].\n", entry_type));
+ return false;
}
if (ret != EOK) {
--
1.7.7.6
More information about the sssd-devel
mailing list