Bug 1347361 - fix compile warnings in ldap/xpcom. r=jorgk

This commit is contained in:
aceman 2017-03-14 18:39:00 +01:00
Родитель 468c5bf127
Коммит e8f1969b62
2 изменённых файлов: 11 добавлений и 12 удалений

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

@ -427,7 +427,7 @@ nsLDAPOperation::SearchExt(const nsACString& aBaseDn, int32_t aScope,
if (NS_FAILED(rv)) {
MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Error,
("nsLDAPOperation::SearchExt(): error converting server "
"control array: %x", rv));
"control array: %" PRIx32, static_cast<uint32_t>(rv)));
return rv;
}
}
@ -438,7 +438,7 @@ nsLDAPOperation::SearchExt(const nsACString& aBaseDn, int32_t aScope,
if (NS_FAILED(rv)) {
MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Error,
("nsLDAPOperation::SearchExt(): error converting client "
"control array: %x", rv));
"control array: %" PRIx32, static_cast<uint32_t>(rv)));
ldap_controls_free(serverctls);
return rv;
}
@ -697,8 +697,8 @@ nsLDAPOperation::AddExt(const nsACString& aBaseDn,
if (NS_FAILED(rv)) {
(void)ldap_abandon_ext(mConnectionHandle, mMsgID, 0, 0);
MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Debug,
("nsLDAPOperation::AddExt(): abandoned due to rv %x",
rv));
("nsLDAPOperation::AddExt(): abandoned due to rv %" PRIx32,
static_cast<uint32_t>(rv)));
}
return rv;
}
@ -747,8 +747,8 @@ nsLDAPOperation::DeleteExt(const nsACString& aBaseDn)
if (NS_FAILED(rv)) {
(void)ldap_abandon_ext(mConnectionHandle, mMsgID, 0, 0);
MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Debug,
("nsLDAPOperation::AddExt(): abandoned due to rv %x",
rv));
("nsLDAPOperation::AddExt(): abandoned due to rv %" PRIx32,
static_cast<uint32_t>(rv)));
}
return rv;
}
@ -860,8 +860,8 @@ nsLDAPOperation::ModifyExt(const nsACString& aBaseDn,
if (NS_FAILED(rv)) {
(void)ldap_abandon_ext(mConnectionHandle, mMsgID, 0, 0);
MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Debug,
("nsLDAPOperation::AddExt(): abandoned due to rv %x",
rv));
("nsLDAPOperation::AddExt(): abandoned due to rv %" PRIx32,
static_cast<uint32_t>(rv)));
}
return rv;
}
@ -923,8 +923,8 @@ nsLDAPOperation::Rename(const nsACString& aBaseDn,
if (NS_FAILED(rv)) {
(void)ldap_abandon_ext(mConnectionHandle, mMsgID, 0, 0);
MOZ_LOG(gLDAPLogModule, mozilla::LogLevel::Debug,
("nsLDAPOperation::AddExt(): abandoned due to rv %x",
rv));
("nsLDAPOperation::AddExt(): abandoned due to rv %" PRIx32,
static_cast<uint32_t>(rv)));
}
return rv;
}

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

@ -265,8 +265,7 @@ NS_IMETHODIMP nsLDAPService::DeleteServer(const char16_t *aKey)
// "deleted", so that we can add in a new one with the same ID.
// This is bug #77669.
//
mServers.Get(nsDependentString(aKey), &entry);
if (entry) {
if (mServers.Get(nsDependentString(aKey), &entry) && entry) {
if (entry->GetLeases() > 0) {
return NS_ERROR_FAILURE;
}