summaryrefslogtreecommitdiffstats
path: root/source/libsmb/spnego.c
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2005-03-30 04:40:24 +0000
committerDerrell Lipman <derrell@samba.org>2005-03-30 04:40:24 +0000
commitd09aed00c7b2c7bc703da2101e7f61cb72acf50f (patch)
treecef2400387129db212b0007bb30c797a4123a40f /source/libsmb/spnego.c
parent1e67cf5c2a0dee0c18954a9db1ac67f1a978a425 (diff)
downloadsamba-d09aed00c7b2c7bc703da2101e7f61cb72acf50f.tar.gz
samba-d09aed00c7b2c7bc703da2101e7f61cb72acf50f.tar.xz
samba-d09aed00c7b2c7bc703da2101e7f61cb72acf50f.zip
r6127: Eliminated all compiler warnings pertaining to mismatched "qualifiers". The
whole of samba comiles warning-free with the default compiler flags. Temporarily defined -Wall to locate other potential problems. Found an unused static function (#ifdefed out rather than deleted, in case it's needed for something in progress). There are also a number of uses of undeclared functions, mostly krb5_*. Files with these problems need to have appropriate header files included, but they are not fixed in this update. oplock_linux.c.c has undefined functions capget() and capset(), which need to have "#undef _POSIX_SOURCE" specified before including <sys/capability.h>, but that could potentially have other side effects, so that remains uncorrected as well. The flag -Wall should be added permanently to CFLAGS, and all warnings then generated should be eliminated.
Diffstat (limited to 'source/libsmb/spnego.c')
-rw-r--r--source/libsmb/spnego.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/libsmb/spnego.c b/source/libsmb/spnego.c
index a0f5565d4f3..090148d415f 100644
--- a/source/libsmb/spnego.c
+++ b/source/libsmb/spnego.c
@@ -42,12 +42,12 @@ static BOOL read_negTokenInit(ASN1_DATA *asn1, negTokenInit_t *token)
asn1_start_tag(asn1, ASN1_CONTEXT(0));
asn1_start_tag(asn1, ASN1_SEQUENCE(0));
- token->mechTypes = SMB_MALLOC_P(char *);
+ token->mechTypes = SMB_MALLOC_P(const char *);
for (i = 0; !asn1->has_error &&
0 < asn1_tag_remaining(asn1); i++) {
token->mechTypes =
- SMB_REALLOC_ARRAY(token->mechTypes, char *, i + 2);
- asn1_read_OID(asn1, token->mechTypes + i);
+ SMB_REALLOC_ARRAY(token->mechTypes, const char *, i + 2);
+ asn1_read_OID(asn1, (char **) (token->mechTypes + i));
}
token->mechTypes[i] = NULL;
@@ -182,7 +182,7 @@ static BOOL read_negTokenTarg(ASN1_DATA *asn1, negTokenTarg_t *token)
break;
case ASN1_CONTEXT(1):
asn1_start_tag(asn1, ASN1_CONTEXT(1));
- asn1_read_OID(asn1, &token->supportedMech);
+ asn1_read_OID(asn1, (char **) &token->supportedMech);
asn1_end_tag(asn1);
break;
case ASN1_CONTEXT(2):
@@ -317,7 +317,7 @@ BOOL free_spnego_data(SPNEGO_DATA *spnego)
if (spnego->negTokenInit.mechTypes) {
int i;
for (i = 0; spnego->negTokenInit.mechTypes[i]; i++) {
- free(spnego->negTokenInit.mechTypes[i]);
+ free((void *) spnego->negTokenInit.mechTypes[i]);
}
free(spnego->negTokenInit.mechTypes);
}
@@ -326,7 +326,7 @@ BOOL free_spnego_data(SPNEGO_DATA *spnego)
break;
case SPNEGO_NEG_TOKEN_TARG:
if (spnego->negTokenTarg.supportedMech) {
- free(spnego->negTokenTarg.supportedMech);
+ free((void *) spnego->negTokenTarg.supportedMech);
}
data_blob_free(&spnego->negTokenTarg.responseToken);
data_blob_free(&spnego->negTokenTarg.mechListMIC);