Fixed all of the compiler warnings for the client components.

This commit is contained in:
Juan Carlos Luciani
2006-10-06 20:13:14 +00:00
parent 06369edbd9
commit 665c251e3b
12 changed files with 100 additions and 109 deletions

View File

@@ -67,10 +67,9 @@ GetUserCredentials(
char *pUsername;
char *pPassword;
int rcode = NSSCS_E_OBJECT_NOT_FOUND;
int32_t credtype = SSCS_CRED_TYPE_BASIC_F;
uint32_t credtype = SSCS_CRED_TYPE_BASIC_F;
SSCS_BASIC_CREDENTIAL credential = {0};
SSCS_SECRET_ID_T secretId = {0};
SSCS_SECRET_ID_T sharedSecretId = {0};
DbgTrace(1, "-GetUserCredentials- Start\n", 0);
@@ -84,7 +83,7 @@ GetUserCredentials(
if (secretId.len <= NSSCS_MAX_SECRET_ID_LEN)
{
// Set the secret id in the structure
sscs_Utf8Strcpy(secretId.id, pRealm);
sscs_Utf8Strcpy((char*) secretId.id, pRealm);
// Specify that we want the common name
credential.unFlags = USERNAME_TYPE_CN_F;
@@ -95,19 +94,19 @@ GetUserCredentials(
NULL,
&credtype,
&credential,
NULL);
(SSCS_EXT_T*) NULL);
if (rcode != NSSCS_SUCCESS)
{
// There were no credentials for the realm, now try to obtain the
// desktop credentials.
secretId.len = sscs_Utf8Strlen("Desktop") + 1;
sscs_Utf8Strcpy(secretId.id, "Desktop");
sscs_Utf8Strcpy((char*) secretId.id, "Desktop");
rcode = miCASAGetCredential(0,
&secretId,
NULL,
&credtype,
&credential,
NULL);
(SSCS_EXT_T*) NULL);
}
}
else
@@ -124,18 +123,18 @@ GetUserCredentials(
&& credential.password != NULL)
{
// Allocate a buffer to return the username
pUsername = (char*) malloc(strlen(credential.username) + 1);
pUsername = (char*) malloc(strlen((char*) credential.username) + 1);
if (pUsername)
{
// Copy the username into the buffer that we will be returning
strcpy(pUsername, credential.username);
strcpy(pUsername, (char*) credential.username);
// Allocate a buffer to return the password
pPassword = (char*) malloc(strlen(credential.password) + 1);
pPassword = (char*) malloc(strlen((char*) credential.password) + 1);
if (pPassword)
{
// Copy the password into the buffer that we will be returning
strcpy(pPassword, credential.password);
strcpy(pPassword, (char*) credential.password);
DbgTrace(1, "-GetUserCredentials- Username = %s\n", pUsername);