Bug 563191 - Fix clang warnings about string constants in nsAuthSambaNTLM::SpawnNTLMAuthHelper. r=ehsan

This commit is contained in:
Cameron McCormack 2012-07-12 11:05:02 +10:00
Родитель a01719d6c3
Коммит f1129dbe54
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -46,7 +46,7 @@ nsAuthSambaNTLM::Shutdown()
NS_IMPL_ISUPPORTS1(nsAuthSambaNTLM, nsIAuthModule)
static bool
SpawnIOChild(char** aArgs, PRProcess** aPID,
SpawnIOChild(char* const* aArgs, PRProcess** aPID,
PRFileDesc** aFromChildFD, PRFileDesc** aToChildFD)
{
PRFileDesc* toChildPipeRead;
@ -172,15 +172,15 @@ nsAuthSambaNTLM::SpawnNTLMAuthHelper()
if (!username)
return NS_ERROR_FAILURE;
char* args[] = {
const char* const args[] = {
"ntlm_auth",
"--helper-protocol", "ntlmssp-client-1",
"--use-cached-creds",
"--username", const_cast<char*>(username),
"--username", username,
nsnull
};
bool isOK = SpawnIOChild(args, &mChildPID, &mFromChildFD, &mToChildFD);
bool isOK = SpawnIOChild(const_cast<char* const*>(args), &mChildPID, &mFromChildFD, &mToChildFD);
if (!isOK)
return NS_ERROR_FAILURE;