summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/hx509
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-09-29 11:43:17 +0200
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-03 13:20:52 +0200
commit02b289f65bf567acb233ad01e3512a9e29b6c757 (patch)
tree8b43ee2bd1fa1811ec999555a04296ff5e2d3156 /source4/heimdal/lib/hx509
parentbe938ab44b6095818501b23ca8422c731e14015a (diff)
downloadsamba-02b289f65bf567acb233ad01e3512a9e29b6c757.tar.gz
samba-02b289f65bf567acb233ad01e3512a9e29b6c757.tar.bz2
samba-02b289f65bf567acb233ad01e3512a9e29b6c757.zip
heimdal - fix various warnings
- Shadowed variables - "const" related warnings - Parameter names which shadow function declarations - Non-void functions which have no return value (patch also ported upstream)
Diffstat (limited to 'source4/heimdal/lib/hx509')
-rw-r--r--source4/heimdal/lib/hx509/ca.c2
-rw-r--r--source4/heimdal/lib/hx509/cert.c1
-rw-r--r--source4/heimdal/lib/hx509/file.c8
-rw-r--r--source4/heimdal/lib/hx509/ks_file.c10
-rw-r--r--source4/heimdal/lib/hx509/name.c20
-rw-r--r--source4/heimdal/lib/hx509/sel.c1
6 files changed, 21 insertions, 21 deletions
diff --git a/source4/heimdal/lib/hx509/ca.c b/source4/heimdal/lib/hx509/ca.c
index 624d74289d..95f206f195 100644
--- a/source4/heimdal/lib/hx509/ca.c
+++ b/source4/heimdal/lib/hx509/ca.c
@@ -692,7 +692,7 @@ add_utf8_san(hx509_context context,
const heim_oid *oid,
const char *string)
{
- const PKIXXmppAddr ustring = (const PKIXXmppAddr)string;
+ const PKIXXmppAddr ustring = string;
heim_octet_string os;
size_t size;
int ret;
diff --git a/source4/heimdal/lib/hx509/cert.c b/source4/heimdal/lib/hx509/cert.c
index cd9ae01fac..7eda0eba48 100644
--- a/source4/heimdal/lib/hx509/cert.c
+++ b/source4/heimdal/lib/hx509/cert.c
@@ -3383,7 +3383,6 @@ _hx509_cert_to_env(hx509_context context, hx509_cert cert, hx509_env *env)
Certificate *c = _hx509_get_cert(cert);
heim_octet_string os, sig;
hx509_env envhash = NULL;
- char *buf;
os.data = c->tbsCertificate.subjectPublicKeyInfo.subjectPublicKey.data;
os.length =
diff --git a/source4/heimdal/lib/hx509/file.c b/source4/heimdal/lib/hx509/file.c
index ba7a23f471..674d2706ce 100644
--- a/source4/heimdal/lib/hx509/file.c
+++ b/source4/heimdal/lib/hx509/file.c
@@ -121,14 +121,14 @@ hx509_pem_write(hx509_context context, const char *type,
int
hx509_pem_add_header(hx509_pem_header **headers,
- const char *header, const char *value)
+ const char *hdr, const char *value)
{
hx509_pem_header *h;
h = calloc(1, sizeof(*h));
if (h == NULL)
return ENOMEM;
- h->header = strdup(header);
+ h->header = strdup(hdr);
if (h->header == NULL) {
free(h);
return ENOMEM;
@@ -164,10 +164,10 @@ hx509_pem_free_header(hx509_pem_header *headers)
*/
const char *
-hx509_pem_find_header(const hx509_pem_header *h, const char *header)
+hx509_pem_find_header(const hx509_pem_header *h, const char *hdr)
{
while(h) {
- if (strcmp(header, h->header) == 0)
+ if (strcmp(hdr, h->header) == 0)
return h->value;
h = h->next;
}
diff --git a/source4/heimdal/lib/hx509/ks_file.c b/source4/heimdal/lib/hx509/ks_file.c
index 553191a774..3955820aef 100644
--- a/source4/heimdal/lib/hx509/ks_file.c
+++ b/source4/heimdal/lib/hx509/ks_file.c
@@ -413,24 +413,24 @@ file_init_common(hx509_context context,
goto out;
for (p = f->fn; p != NULL; p = pnext) {
- FILE *f;
+ FILE *f2;
pnext = strchr(p, ',');
if (pnext)
*pnext++ = '\0';
- if ((f = fopen(p, "r")) == NULL) {
+ if ((f2 = fopen(p, "r")) == NULL) {
ret = ENOENT;
hx509_set_error_string(context, 0, ret,
"Failed to open PEM file \"%s\": %s",
p, strerror(errno));
goto out;
}
- rk_cloexec_file(f);
+ rk_cloexec_file(f2);
- ret = hx509_pem_read(context, f, pem_func, &pem_ctx);
- fclose(f);
+ ret = hx509_pem_read(context, f2, pem_func, &pem_ctx);
+ fclose(f2);
if (ret != 0 && ret != HX509_PARSING_KEY_FAILED)
goto out;
else if (ret == HX509_PARSING_KEY_FAILED) {
diff --git a/source4/heimdal/lib/hx509/name.c b/source4/heimdal/lib/hx509/name.c
index 23736edde3..546b749015 100644
--- a/source4/heimdal/lib/hx509/name.c
+++ b/source4/heimdal/lib/hx509/name.c
@@ -926,12 +926,12 @@ hx509_general_name_unparse(GeneralName *name, char **str)
switch (name->element) {
case choice_GeneralName_otherName: {
- char *str;
- hx509_oid_sprint(&name->u.otherName.type_id, &str);
- if (str == NULL)
+ char *str2;
+ hx509_oid_sprint(&name->u.otherName.type_id, &str2);
+ if (str2 == NULL)
return ENOMEM;
- strpool = rk_strpoolprintf(strpool, "otherName: %s", str);
- free(str);
+ strpool = rk_strpoolprintf(strpool, "otherName: %s", str2);
+ free(str2);
break;
}
case choice_GeneralName_rfc822Name:
@@ -986,12 +986,12 @@ hx509_general_name_unparse(GeneralName *name, char **str)
break;
}
case choice_GeneralName_registeredID: {
- char *str;
- hx509_oid_sprint(&name->u.registeredID, &str);
- if (str == NULL)
+ char *str2;
+ hx509_oid_sprint(&name->u.registeredID, &str2);
+ if (str2 == NULL)
return ENOMEM;
- strpool = rk_strpoolprintf(strpool, "registeredID: %s", str);
- free(str);
+ strpool = rk_strpoolprintf(strpool, "registeredID: %s", str2);
+ free(str2);
break;
}
default:
diff --git a/source4/heimdal/lib/hx509/sel.c b/source4/heimdal/lib/hx509/sel.c
index 5932ce84c3..c5e760569a 100644
--- a/source4/heimdal/lib/hx509/sel.c
+++ b/source4/heimdal/lib/hx509/sel.c
@@ -176,6 +176,7 @@ _hx509_expr_eval(hx509_context context, hx509_env env, struct hx_expr *expr)
default:
_hx509_abort("hx509 eval expr with unknown op: %d", (int)expr->op);
}
+ return 0;
}
void