Closed Bug 491190 Opened 15 years ago Closed 12 years ago

fix miscellaneous warnings in networking modules

Categories

(Core :: Networking, defect)

x86
macOS
defect
Not set
trivial

Tracking

()

RESOLVED DUPLICATE of bug 745296

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug)

Details

(Whiteboard: [build_warning])

Attachments

(1 file, 2 obsolete files)

      No description provided.
Attached patch wrong patch (obsolete) — Splinter Review
Attachment #375515 - Flags: superreview?(cbiesinger)
Attachment #375515 - Flags: review?(ted.mielczarek)
Attachment #375515 - Flags: superreview?(cbiesinger) → superreview+
Comment on attachment 375515 [details] [diff] [review]
wrong patch

this patch is identical to attachment 375514 [details] [diff] [review], you probably meant to attach a different one to this bug?
Attached patch patch (obsolete) — Splinter Review
Attachment #375515 - Attachment is obsolete: true
Attachment #375802 - Flags: superreview?(cbiesinger)
Attachment #375802 - Flags: review?(cbiesinger)
Attachment #375515 - Flags: review?(ted.mielczarek)
Attachment #375515 - Attachment description: patch → wrong patch
Attachment #375515 - Flags: superreview+
Attached patch updatedSplinter Review
Attachment #384278 - Flags: superreview?(cbiesinger)
Attachment #384278 - Flags: review?(cbiesinger)
Attachment #375802 - Attachment is obsolete: true
Attachment #375802 - Flags: superreview?(cbiesinger)
Attachment #375802 - Flags: review?(cbiesinger)
Comment on attachment 384278 [details] [diff] [review]
updated

+++ b/modules/libjar/nsJARInputStream.cpp
+                if ((PRUint32)bytesRead != aCount) {

can you use a constructor-style cast instead? (if (PRUint32(bytesRead) ...))

+++ b/modules/libjar/nsZipArchive.cpp
+      if ((PRUint32)byteCount < (namelen + extralen + commentlen + sizeof(sig))) {

here too

+++ b/netwerk/build/nsNetModule.cpp
+#undef assert

why this?

+++ b/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
+  if (aInLength < 0 || pos >= (PRUint32) aInLength) {

constructor-style cast

+        (nsCRT::IsAsciiAlpha(lastChar = aInString[i]) ||
+         nsCRT::IsAsciiDigit(lastChar)))

I think it would be better to just use aInString[i] in both these lines and not change lastChar.

+  PRInt32 index;

why declare that up here?

+++ b/netwerk/streamconv/src/nsAppleFileDecoder.cpp
-        long count = dataCount;
+        SInt32 count = dataCount;
+        if (noErr != FSWrite(m_rfRefNum, &count, buffPtr) ||
+            (PRUint32) count != dataCount)

Does this meean that the documentation is incorrect?
http://developer.apple.com/documentation/mac/devices/Devices-33.html

+++ b/netwerk/streamconv/src/nsAppleFileDecoder.h
-#define NUM_ENTRIES 		6
+#define NUM_ENTRIES    	    6

if you're removing tabs on other lines, remove them here as well? :)
Attachment #384278 - Flags: superreview?(cbiesinger)
Attachment #384278 - Flags: review?(cbiesinger)
Attachment #384278 - Flags: review-
oh... ignore the first two comments, looks like libjar doesn't really do that style of casts
Whiteboard: [build_warning]
Blocks: buildwarning
We're getting rid of necko warnings in bug 745296
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: