diff options
author | Tobias Brunner <tobias@strongswan.org> | 2015-08-13 15:09:00 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2015-08-13 15:12:38 +0200 |
commit | 6967948241c59642d0a696b6ec12482dab13e74d (patch) | |
tree | 09bfffb463d44f9b180bd06c431c05a6b535e56f /src | |
parent | f809e485fb8b7229fd5294c5183656f05c993358 (diff) | |
download | strongswan-6967948241c59642d0a696b6ec12482dab13e74d.tar.bz2 strongswan-6967948241c59642d0a696b6ec12482dab13e74d.tar.xz |
Initialize variables that some compilers seem to warn about
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/plugins/vici/vici_control.c | 2 | ||||
-rw-r--r-- | src/libcharon/sa/ikev2/authenticators/pubkey_authenticator.c | 2 | ||||
-rw-r--r-- | src/libstrongswan/plugins/plugin_feature.c | 2 | ||||
-rw-r--r-- | src/libstrongswan/utils/utils/string.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/libcharon/plugins/vici/vici_control.c b/src/libcharon/plugins/vici/vici_control.c index 01d503644..408d29985 100644 --- a/src/libcharon/plugins/vici/vici_control.c +++ b/src/libcharon/plugins/vici/vici_control.c @@ -138,7 +138,7 @@ static child_cfg_t* find_child_cfg(char *name, peer_cfg_t **out) { enumerator_t *enumerator; peer_cfg_t *peer_cfg; - child_cfg_t *child_cfg; + child_cfg_t *child_cfg = NULL; enumerator = charon->backends->create_peer_cfg_enumerator( charon->backends, NULL, NULL, NULL, NULL, IKE_ANY); diff --git a/src/libcharon/sa/ikev2/authenticators/pubkey_authenticator.c b/src/libcharon/sa/ikev2/authenticators/pubkey_authenticator.c index 151b49718..2284a484d 100644 --- a/src/libcharon/sa/ikev2/authenticators/pubkey_authenticator.c +++ b/src/libcharon/sa/ikev2/authenticators/pubkey_authenticator.c @@ -321,7 +321,7 @@ METHOD(authenticator_t, build, status_t, chunk_t auth_data; status_t status; auth_payload_t *auth_payload; - auth_method_t auth_method; + auth_method_t auth_method = AUTH_NONE; id = this->ike_sa->get_my_id(this->ike_sa); auth = this->ike_sa->get_auth_cfg(this->ike_sa, TRUE); diff --git a/src/libstrongswan/plugins/plugin_feature.c b/src/libstrongswan/plugins/plugin_feature.c index 2d0ce8a4c..e909f4adf 100644 --- a/src/libstrongswan/plugins/plugin_feature.c +++ b/src/libstrongswan/plugins/plugin_feature.c @@ -59,7 +59,7 @@ ENUM(plugin_feature_names, FEATURE_NONE, FEATURE_CUSTOM, */ u_int32_t plugin_feature_hash(plugin_feature_t *feature) { - chunk_t data; + chunk_t data = chunk_empty; switch (feature->type) { diff --git a/src/libstrongswan/utils/utils/string.c b/src/libstrongswan/utils/utils/string.c index 14087e765..56910ed79 100644 --- a/src/libstrongswan/utils/utils/string.c +++ b/src/libstrongswan/utils/utils/string.c @@ -44,7 +44,7 @@ char* translate(char *str, const char *from, const char *to) char* strreplace(const char *str, const char *search, const char *replace) { size_t len, slen, rlen, count = 0; - char *res, *pos, *found, *dst; + char *res, *pos, *found = NULL, *dst; if (!str || !*str || !search || !*search || !replace) { |