From 1f97a06a01de7f901045be297a8244614191e552 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 9 Jun 2014 12:52:20 -0400 Subject: [PATCH] Fix some uninitialized value The compiler complain about these values not being initialized. come of them do not really matter as they are only really used when later initialized in the code and the code paths would not use them if not initialized in a previous block, however some of these seem real issues. In all cases make the compiler happy so we get less noise in the build and less false positives in code chckers. License: MIT Signed-off-by: Simo Sorce --- lasso/id-ff/provider.c | 2 +- lasso/saml-2.0/login.c | 2 +- lasso/xml/tools.c | 2 +- lasso/xml/xml.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lasso/id-ff/provider.c b/lasso/id-ff/provider.c index 275207c6..9ab90982 100644 --- a/lasso/id-ff/provider.c +++ b/lasso/id-ff/provider.c @@ -1773,7 +1773,7 @@ lasso_provider_add_key(LassoProvider *provider, LassoKey *key, gboolean after) LassoSignatureContext context; lasso_error_t rc = 0; GList **list = NULL; - xmlSecKey *xml_sec_key; + xmlSecKey *xml_sec_key = NULL; lasso_bad_param(PROVIDER, provider); lasso_bad_param(KEY, key); diff --git a/lasso/saml-2.0/login.c b/lasso/saml-2.0/login.c index 40093c98..4d332926 100644 --- a/lasso/saml-2.0/login.c +++ b/lasso/saml-2.0/login.c @@ -1395,7 +1395,7 @@ lasso_saml20_login_build_authn_response_msg(LassoLogin *login) LassoProfile *profile; LassoProvider *remote_provider = NULL; LassoSaml2Assertion *assertion = NULL; - LassoHttpMethod http_method; + LassoHttpMethod http_method = LASSO_HTTP_METHOD_NONE; char *url = NULL; int rc = 0; diff --git a/lasso/xml/tools.c b/lasso/xml/tools.c index 5ae12919..2e575b86 100644 --- a/lasso/xml/tools.c +++ b/lasso/xml/tools.c @@ -483,7 +483,7 @@ lasso_query_sign(char *query, LassoSignatureContext context) const xmlChar *algo_href = NULL; char *hmac_key; size_t hmac_key_length; - const EVP_MD *md; + const EVP_MD *md = NULL; xmlSecKey *key; xmlSecKeyData *key_data; unsigned int sigret_size = 0; diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index b881422b..0234bb93 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -1417,7 +1417,7 @@ lasso_node_impl_init_from_xml(LassoNode *node, xmlNode *xmlnode) SnippetType type; struct XmlSnippet *snippet_any = NULL; struct XmlSnippet *snippet_any_attribute = NULL; - GType g_type_collect_namespaces, g_type_any, g_type_any_attribute; + GType g_type_collect_namespaces = 0, g_type_any = 0, g_type_any_attribute = 0; struct XmlSnippet *snippet_collect_namespaces = NULL; struct XmlSnippet *snippet_signature = NULL; gboolean keep_xmlnode = FALSE;