зеркало из https://github.com/mozilla/gecko-dev.git
Bug 577921 mark DEBUG only variables as ifdef DEBUG in xpcom
r=bsmedberg a=bsmedberg a=sheriff for landing
This commit is contained in:
Родитель
6f27d118a4
Коммит
a484089327
|
@ -133,7 +133,10 @@ nsSystemInfo::SetInt32Property(const nsAString &aPropertyName,
|
|||
{
|
||||
NS_WARN_IF_FALSE(aValue > 0, "Unable to read system value");
|
||||
if (aValue > 0) {
|
||||
nsresult rv = SetPropertyAsInt32(aPropertyName, aValue);
|
||||
#ifdef DEBUG
|
||||
nsresult rv =
|
||||
#endif
|
||||
SetPropertyAsInt32(aPropertyName, aValue);
|
||||
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Unable to set property");
|
||||
}
|
||||
}
|
||||
|
@ -144,7 +147,10 @@ nsSystemInfo::SetUint64Property(const nsAString &aPropertyName,
|
|||
{
|
||||
NS_WARN_IF_FALSE(aValue > 0, "Unable to read system value");
|
||||
if (aValue > 0) {
|
||||
nsresult rv = SetPropertyAsUint64(aPropertyName, aValue);
|
||||
#ifdef DEBUG
|
||||
nsresult rv =
|
||||
#endif
|
||||
SetPropertyAsUint64(aPropertyName, aValue);
|
||||
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Unable to set property");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,7 +113,10 @@ const char* AssertEqual(PRInt32 aValue1, PRInt32 aValue2)
|
|||
void DumpArray(nsISupportsArray* aArray, PRInt32 aExpectedCount, PRInt32 aElementIDs[], PRInt32 aExpectedTotal)
|
||||
{
|
||||
PRUint32 cnt = 0;
|
||||
nsresult rv = aArray->Count(&cnt);
|
||||
#ifdef DEBUG
|
||||
nsresult rv =
|
||||
#endif
|
||||
aArray->Count(&cnt);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "Count failed");
|
||||
PRInt32 count = cnt;
|
||||
PRInt32 index;
|
||||
|
|
|
@ -61,8 +61,15 @@ PRIntn sign(PRIntn val) {
|
|||
// iso-latin-1 strings, so the comparison must be valid.
|
||||
static void Check(const char* s1, const char* s2, PRIntn n)
|
||||
{
|
||||
PRIntn clib = PL_strcmp(s1, s2);
|
||||
PRIntn clib_n = PL_strncmp(s1, s2, n);
|
||||
#ifdef DEBUG
|
||||
PRIntn clib =
|
||||
#endif
|
||||
PL_strcmp(s1, s2);
|
||||
|
||||
#ifdef DEBUG
|
||||
PRIntn clib_n =
|
||||
#endif
|
||||
PL_strncmp(s1, s2, n);
|
||||
|
||||
nsAutoString t1,t2;
|
||||
t1.AssignWithConversion(s1);
|
||||
|
@ -70,8 +77,15 @@ static void Check(const char* s1, const char* s2, PRIntn n)
|
|||
const PRUnichar* us1 = t1.get();
|
||||
const PRUnichar* us2 = t2.get();
|
||||
|
||||
PRIntn u2 = nsCRT::strcmp(us1, us2);
|
||||
PRIntn u2_n = nsCRT::strncmp(us1, us2, n);
|
||||
#ifdef DEBUG
|
||||
PRIntn u2 =
|
||||
#endif
|
||||
nsCRT::strcmp(us1, us2);
|
||||
|
||||
#ifdef DEBUG
|
||||
PRIntn u2_n =
|
||||
#endif
|
||||
nsCRT::strncmp(us1, us2, n);
|
||||
|
||||
NS_ASSERTION(sign(clib) == sign(u2), "strcmp");
|
||||
NS_ASSERTION(sign(clib_n) == sign(u2_n), "strncmp");
|
||||
|
|
|
@ -327,7 +327,11 @@ TestShortWrites(nsIInputStream* in, nsIOutputStream* out)
|
|||
//printf("calling Flush\n");
|
||||
out->Flush();
|
||||
//printf("calling WaitForReceipt\n");
|
||||
const PRUint32 received = receiver->WaitForReceipt(writeCount);
|
||||
|
||||
#ifdef DEBUG
|
||||
const PRUint32 received =
|
||||
#endif
|
||||
receiver->WaitForReceipt(writeCount);
|
||||
NS_ASSERTION(received == writeCount, "received wrong amount");
|
||||
}
|
||||
rv = out->Close();
|
||||
|
|
Загрузка…
Ссылка в новой задаче