Bug 577915 mark DEBUG only variables as ifdef DEBUG in libjar; r=dveditz a=jst

This commit is contained in:
timeless@mozdev.org 2010-07-11 15:49:52 +03:00
Родитель 7453b6a04c
Коммит b775fcf91f
3 изменённых файлов: 24 добавлений и 7 удалений

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

@ -151,7 +151,10 @@ nsrefcnt nsJAR::Release(void)
return 0;
}
else if (1 == count && mCache) {
nsresult rv = mCache->ReleaseZip(this);
#ifdef DEBUG
nsresult rv =
#endif
mCache->ReleaseZip(this);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to release zip file");
}
return count;
@ -1150,7 +1153,10 @@ nsZipReaderCache::GetZip(nsIFile* zipFile, nsIZipReader* *result)
return rv;
}
PRBool collision = mZips.Put(&key, static_cast<nsIZipReader*>(zip)); // AddRefs to 2
#ifdef DEBUG
PRBool collision =
#endif
mZips.Put(&key, static_cast<nsIZipReader*>(zip)); // AddRefs to 2
NS_ASSERTION(!collision, "horked");
}
*result = zip;
@ -1304,8 +1310,10 @@ nsZipReaderCache::ReleaseZip(nsJAR* zip)
}
nsCStringKey key(uri);
PRBool removed;
removed = mZips.Remove(&key); // Releases
#ifdef DEBUG
PRBool removed =
#endif
mZips.Remove(&key); // Releases
NS_ASSERTION(removed, "botched");
return NS_OK;
@ -1337,7 +1345,10 @@ nsZipReaderCache::Observe(nsISupports *aSubject,
mZips.Enumerate(FindFlushableZip, &flushable);
if ( ! flushable )
break;
PRBool removed = mZips.Remove(flushable); // Releases
#ifdef DEBUG
PRBool removed =
#endif
mZips.Remove(flushable); // Releases
NS_ASSERTION(removed, "botched");
#ifdef xDEBUG_jband

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

@ -94,7 +94,10 @@ public:
, mContentLength(-1)
{
if (fullJarURI) {
nsresult rv = fullJarURI->GetAsciiSpec(mJarDirSpec);
#ifdef DEBUG
nsresult rv =
#endif
fullJarURI->GetAsciiSpec(mJarDirSpec);
NS_ASSERTION(NS_SUCCEEDED(rv), "this shouldn't fail");
}
}

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

@ -1002,7 +1002,10 @@ nsZipCursor::nsZipCursor(nsZipItem *item, nsZipArchive *aZip, PRUint8* aBuf, PRU
mDoCRC(doCRC)
{
if (mItem->Compression() == DEFLATED) {
nsresult status = gZlibInit(&mZs);
#ifdef DEBUG
nsresult status =
#endif
gZlibInit(&mZs);
NS_ASSERTION(status == NS_OK, "Zlib failed to initialize");
NS_ASSERTION(aBuf, "Must pass in a buffer for DEFLATED nsZipItem");
}