Closed Bug 161417 Opened 18 years ago Closed 17 years ago

recent netwerk checkin upped warning count by 4

Categories

(Core :: Networking: Cache, defect, P3)

x86
All
defect

Tracking

()

VERIFIED FIXED
mozilla1.2alpha

People

(Reporter: timeless, Assigned: darin.moz)

References

Details

Attachments

(1 file)

http://tinderbox.mozilla.org/SeaMonkey/warn1028682120.14846.html#darin
http://tinderbox.mozilla.org/SeaMonkey/warn1028685240.20418.html#darin

2.netwerk/cache/src/nsDiskCacheDevice.cpp:689 (See build log excerpt)Unused
variable `nsresult rv'

687 PRUint32  newSize = entry->DataSize() + deltaSize;
688 if (newSize > mCacheCapacity) {
689     nsresult rv = nsCacheService::DoomEntry(entry);
690     NS_ASSERTION(NS_SUCCEEDED(rv),"DoomEntry() failed.");
691     return NS_ERROR_ABORT;

3.netwerk/cache/src/nsDiskCacheEntry.cpp:106 (See build log excerpt)`PRInt32
pad' might be used uninitialized in this function

104 
105 // pad size so we can write to block files without overrunning buffer
106 PRInt32 pad;
107 if      (size <=  1024) pad = (((size-1)/ 256) + 1) *  256;
108 else if (size <=  4096) pad = (((size-1)/1024) + 1) * 1024;

4.netwerk/cache/src/nsDiskCacheStreams.cpp:901 (See build log excerpt)Unused
variable `PRUint32 oldSizeK'

899 }
900 
901 PRUint32  oldSizeK = (mStreamEnd + 0x03FF) >> 10;
902 PRUint32  newSizeK = (mStreamPos + 0x03FF) >> 10;

5.netwerk/cache/src/nsDiskCacheStreams.cpp:902 (See build log excerpt)Unused
variable `PRUint32 newSizeK'

900 
901 PRUint32  oldSizeK = (mStreamEnd + 0x03FF) >> 10;
902 PRUint32  newSizeK = (mStreamPos + 0x03FF) >> 10;
903 
904 if (mFD) {

9.netwerk/protocol/http/src/nsHttpChannel.cpp:1876 (See build log
excerpt)`return' with a value, in function returning void

1874             realm.Assign(p);
1875     }
1876 }
1877 
1878 nsresult

As counts go, this one appears to have disappeared (hence +5-1 = +4)

2.netwerk/cache/src/nsDiskCacheDevice.cpp:637 (See build log excerpt)Unused
variable `nsresult rv'

635 NS_ENSURE_ARG_POINTER(result);
636 *result = nsnull;
637 
638 nsAutoLock           lock(mDeviceLock->GetPRLock());     // grab device lock
639 nsresult             rv;
from bug 81724:

------- Additional Comment #31 From Aleksey Nogin  2002-08-07 07:52 -------

This commit have added a new "might be used uninitialized" warning (see also bug
59652) on brad TBox:

+netwerk/cache/src/nsDiskCacheEntry.cpp:106
+ `PRInt32 pad' might be used uninitialized in this function

Indeed, if size is > 16384, the pad will be uninitialized!
Status: NEW → ASSIGNED
Blocks: 59652
OS: Windows 2000 → All
Attached patch v1 patchSplinter Review
fixes the warnings mentioned here, and then some...
Priority: -- → P3
Target Milestone: --- → mozilla1.2alpha
Comment on attachment 94663 [details] [diff] [review]
v1 patch

r=dougt.
Attachment #94663 - Flags: review+
Comment on attachment 94663 [details] [diff] [review]
v1 patch

sr=alecf
Attachment #94663 - Flags: superreview+
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
marking verified - confirmed patch checked in on trunk
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.