avoid uninit variable and unreachable code warnings
most of these warnings are not problems because of ample use of abort() calls. However, the large number of warnings makes it difficult to identify real problems. Initialize the variables to shut up the compilers. Change-Id: I8477c11b17c7b6a7d9074c721fdd2d7303b186a8
This commit is contained in:

committed by
Jeffrey Altman

parent
36dcd37cc7
commit
6850d6a65f
@@ -1449,7 +1449,7 @@ crypto_available(struct crypto_available_options *opt, int argc, char **argv)
|
||||
{
|
||||
AlgorithmIdentifier *val;
|
||||
unsigned int len, i;
|
||||
int ret, type;
|
||||
int ret, type = HX509_SELECT_ALL;
|
||||
|
||||
if (opt->type_string) {
|
||||
if (strcmp(opt->type_string, "all") == 0)
|
||||
@@ -1462,8 +1462,7 @@ crypto_available(struct crypto_available_options *opt, int argc, char **argv)
|
||||
type = HX509_SELECT_SECRET_ENC;
|
||||
else
|
||||
errx(1, "unknown type: %s", opt->type_string);
|
||||
} else
|
||||
type = HX509_SELECT_ALL;
|
||||
}
|
||||
|
||||
ret = hx509_crypto_available(context, type, NULL, &val, &len);
|
||||
if (ret)
|
||||
@@ -1486,7 +1485,7 @@ crypto_select(struct crypto_select_options *opt, int argc, char **argv)
|
||||
{
|
||||
hx509_peer_info peer = NULL;
|
||||
AlgorithmIdentifier selected;
|
||||
int ret, type;
|
||||
int ret, type = HX509_SELECT_DIGEST;
|
||||
char *s;
|
||||
|
||||
if (opt->type_string) {
|
||||
@@ -1498,8 +1497,7 @@ crypto_select(struct crypto_select_options *opt, int argc, char **argv)
|
||||
type = HX509_SELECT_SECRET_ENC;
|
||||
else
|
||||
errx(1, "unknown type: %s", opt->type_string);
|
||||
} else
|
||||
type = HX509_SELECT_DIGEST;
|
||||
}
|
||||
|
||||
if (opt->peer_cmstype_strings.num_strings)
|
||||
peer_strings(context, &peer, &opt->peer_cmstype_strings);
|
||||
|
Reference in New Issue
Block a user