summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2010-03-24 13:03:19 +0100
committerStephen Gallagher <sgallagh@redhat.com>2010-03-25 12:14:14 -0400
commit7c837ddd5b1737b56fc475f7e347efdb067e2330 (patch)
tree178162f35109bb3825ddcee8ef09c4252b052139 /src
parent541578ee21975ab008db2dcec69bd3c3f8283122 (diff)
downloadsssd-7c837ddd5b1737b56fc475f7e347efdb067e2330.tar.gz
sssd-7c837ddd5b1737b56fc475f7e347efdb067e2330.tar.bz2
sssd-7c837ddd5b1737b56fc475f7e347efdb067e2330.zip
Fix warnings from -Wmissing-field-initializers
This patch removes some tab-indentations from pamsrv.c, too.
Diffstat (limited to 'src')
-rw-r--r--src/monitor/monitor.c2
-rw-r--r--src/providers/ldap/ldap_auth.c4
-rw-r--r--src/python/pysss.c8
-rw-r--r--src/resolv/async_resolv.c2
-rw-r--r--src/responder/nss/nsssrv.c2
-rw-r--r--src/responder/pam/pamsrv.c34
-rw-r--r--src/tools/sss_useradd.c2
7 files changed, 28 insertions, 26 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index 58bef34f..d0863092 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -2189,7 +2189,7 @@ int main(int argc, const char *argv[])
_("Run interactive (not a daemon)"), NULL}, \
{"config", 'c', POPT_ARG_STRING, &opt_config_file, 0, \
_("Specify a non-default config file"), NULL}, \
- { NULL }
+ POPT_TABLEEND
};
pc = poptGetContext(argv[0], argc, argv, long_options, 0);
diff --git a/src/providers/ldap/ldap_auth.c b/src/providers/ldap/ldap_auth.c
index 8c77e3aa..c78f5031 100644
--- a/src/providers/ldap/ldap_auth.c
+++ b/src/providers/ldap/ldap_auth.c
@@ -57,9 +57,11 @@ static errno_t check_pwexpire_kerberos(const char *expire_date, time_t now,
enum sdap_result *result)
{
char *end;
- struct tm tm = {0, 0, 0, 0, 0, 0, 0, 0, 0};
+ struct tm tm;
time_t expire_time;
+ memset(&tm, 0, sizeof(tm));
+
*result = SDAP_AUTH_FAILED;
end = strptime(expire_date, "%Y%m%d%H%M%SZ", &tm);
diff --git a/src/python/pysss.c b/src/python/pysss.c
index 8011ed67..bc1cf6e7 100644
--- a/src/python/pysss.c
+++ b/src/python/pysss.c
@@ -888,10 +888,10 @@ static PyMethodDef sss_local_methods[] = {
static PyMemberDef sss_members[] = {
{ discard_const_p(char, "lock"), T_INT,
- offsetof(PySssLocalObject, lock), RO },
+ offsetof(PySssLocalObject, lock), RO, NULL},
{ discard_const_p(char, "unlock"), T_INT,
- offsetof(PySssLocalObject, unlock), RO },
- {NULL} /* Sentinel */
+ offsetof(PySssLocalObject, unlock), RO, NULL},
+ {NULL, 0, 0, 0, NULL} /* Sentinel */
};
/*
@@ -913,7 +913,7 @@ static PyTypeObject pysss_local_type = {
* Module methods
*/
static PyMethodDef module_methods[] = {
- {NULL} /* Sentinel */
+ {NULL, NULL, 0, NULL} /* Sentinel */
};
/*
diff --git a/src/resolv/async_resolv.c b/src/resolv/async_resolv.c
index d0c5b7a3..28237a03 100644
--- a/src/resolv/async_resolv.c
+++ b/src/resolv/async_resolv.c
@@ -140,7 +140,7 @@ check_fd_timeouts(struct tevent_context *ev, struct tevent_timer *te,
static void
add_timeout_timer(struct tevent_context *ev, struct resolv_ctx *ctx)
{
- struct timeval tv = { 0 };
+ struct timeval tv = { 0, 0 };
struct timeval *tvp;
tvp = ares_timeout(ctx->channel, NULL, &tv);
diff --git a/src/responder/nss/nsssrv.c b/src/responder/nss/nsssrv.c
index 9785eeb6..ea2dc518 100644
--- a/src/responder/nss/nsssrv.c
+++ b/src/responder/nss/nsssrv.c
@@ -409,7 +409,7 @@ int main(int argc, const char *argv[])
struct poptOption long_options[] = {
POPT_AUTOHELP
SSSD_MAIN_OPTS
- { NULL }
+ POPT_TABLEEND
};
pc = poptGetContext(argv[0], argc, argv, long_options, 0);
diff --git a/src/responder/pam/pamsrv.c b/src/responder/pam/pamsrv.c
index cb3429f1..7903e34c 100644
--- a/src/responder/pam/pamsrv.c
+++ b/src/responder/pam/pamsrv.c
@@ -168,24 +168,24 @@ int main(int argc, const char *argv[])
struct main_context *main_ctx;
int ret;
- struct poptOption long_options[] = {
- POPT_AUTOHELP
+ struct poptOption long_options[] = {
+ POPT_AUTOHELP
SSSD_MAIN_OPTS
- { NULL }
- };
-
- pc = poptGetContext(argv[0], argc, argv, long_options, 0);
- while((opt = poptGetNextOpt(pc)) != -1) {
- switch(opt) {
- default:
- fprintf(stderr, "\nInvalid option %s: %s\n\n",
- poptBadOption(pc, 0), poptStrerror(opt));
- poptPrintUsage(pc, stderr, 0);
- return 1;
- }
- }
-
- poptFreeContext(pc);
+ POPT_TABLEEND
+ };
+
+ pc = poptGetContext(argv[0], argc, argv, long_options, 0);
+ while((opt = poptGetNextOpt(pc)) != -1) {
+ switch(opt) {
+ default:
+ fprintf(stderr, "\nInvalid option %s: %s\n\n",
+ poptBadOption(pc, 0), poptStrerror(opt));
+ poptPrintUsage(pc, stderr, 0);
+ return 1;
+ }
+ }
+
+ poptFreeContext(pc);
/* set up things like debug, signals, daemonization, etc... */
debug_log_file = "sssd_pam";
diff --git a/src/tools/sss_useradd.c b/src/tools/sss_useradd.c
index 077ac99f..2d88e75e 100644
--- a/src/tools/sss_useradd.c
+++ b/src/tools/sss_useradd.c
@@ -120,7 +120,7 @@ int main(int argc, const char **argv)
{ "groups", 'G', POPT_ARG_STRING, NULL, 'G', _("Groups"), NULL },
{ "create-home", 'm', POPT_ARG_NONE, NULL, 'm', _("Create user's directory if it does not exist"), NULL },
{ "no-create-home", 'M', POPT_ARG_NONE, NULL, 'M', _("Never create user's directory, overrides config"), NULL },
- { "skel", 'k', POPT_ARG_STRING, &pc_skeldir, 0, _("Specify an alternative skeleton directory") },
+ { "skel", 'k', POPT_ARG_STRING, &pc_skeldir, 0, _("Specify an alternative skeleton directory"), NULL },
POPT_TABLEEND
};
poptContext pc = NULL;