fixing xpcom related warnings

RESOLVED INCOMPLETE

Status

()

defect
--
trivial
RESOLVED INCOMPLETE
10 years ago
4 years ago

People

(Reporter: timeless, Assigned: timeless)

Tracking

(Blocks 1 bug)

Trunk
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [build_warning])

Attachments

(1 attachment)

No description provided.
Posted patch patchSplinter Review
Attachment #375512 - Flags: superreview?(cbiesinger)
Attachment #375512 - Flags: review?(benjamin)
Comment on attachment 375512 [details] [diff] [review]
patch

+++ b/xpcom/base/nsDebugImpl.cpp
+     /* fall through */

use // instead of /*, like the rest of the file

+++ b/xpcom/components/nsComponentManager.cpp
+    NS_ASSERTION(aType >= 0 && (PRUint32) aType < mLoaderData.Length(),

PRUint32(aType)
Comment on attachment 375512 [details] [diff] [review]
patch

wrong button

+++ b/xpcom/glue/nsStringAPI.cpp

here too, use constructor-style casts

+++ b/xpcom/io/nsEscape.cpp
+  if ((PRUint32) aSourceBufferLen >=

here too

+++ b/xpcom/proxy/src/nsProxyClassInfo.cpp
+  ++mRefCnt; //NS_ADDREF_THIS();

The proxy changes in here don't seem to be just for fixing a warning... are they supposed to be part of the patch?

If so, probably want to remove the comment here. and add a comment explaining why you do it.

+++ b/xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp
+        printf(" = %s\n", (char*)var[2].val.p);

maybe cast to a const char* instead

+++ b/xpcom/tests/TestHashtables.cpp
 testTHashtable(nsTHashtable<EntityToUnicodeEntry>& hash, PRUint32 numEntries) {
-  printf("Filling hash with %d entries.\n", numEntries);
+  printf("Filling hash with %ul entries.\n", numEntries);


can you test your patches? you want %lu, not %ul for best results. However, really you want %u since a long is not 32-bit everywhere.

(entire file)

+++ b/xpcom/tests/TestStrings.cpp
+    if (rv != (PRInt32) t->rv || result != t->result)

constructor-style cast
Attachment #375512 - Flags: superreview?(cbiesinger) → superreview+
Comment on attachment 375512 [details] [diff] [review]
patch

Canceling review until biesi's things are fixed/addressed.
Attachment #375512 - Flags: review?(benjamin)
Whiteboard: [build_warning]
These xpcom patches from 2009 are no longer relevant.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.