Closed Bug 743573 Opened 12 years ago Closed 12 years ago

Build warnings in dom/

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 4 obsolete files)

Attached patch Patch v1 (obsolete) — Splinter Review
      No description provided.
Attachment #613186 - Flags: review?(mounir)
Comment on attachment 613186 [details] [diff] [review]
Patch v1

Review of attachment 613186 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/base/nsDOMClassInfo.cpp
@@ +8795,5 @@
>    }
>  
> +  nsHTMLDocument* doc = GetDocument(obj);
> +  nsISupports* result = NULL;
> +  nsWrapperCache* cache = NULL;

Could you use nsnull instead?

::: dom/plugins/ipc/PluginModuleParent.cpp
@@ +585,5 @@
>  
>  PluginIdentifierParent*
>  PluginModuleParent::GetIdentifierForNPIdentifier(NPP npp, NPIdentifier aIdentifier)
>  {
> +    PluginIdentifierParent* ident = NULL;

nsnull?
Attachment #613186 - Flags: review?(mounir) → review+
Attached patch Patch v2 (obsolete) — Splinter Review
I don't remember what went wrong with the previous patch, but this passes try: <https://tbpl.mozilla.org/?tree=Try&rev=cc52db937c0f>.
Attachment #613186 - Attachment is obsolete: true
Attachment #640633 - Flags: review?(mounir)
Comment on attachment 640633 [details] [diff] [review]
Patch v2

Review of attachment 640633 [details] [diff] [review]:
-----------------------------------------------------------------

Unfortunately, I don't have cycles for that. Moving to khuey hoping he has some.
Attachment #640633 - Flags: review?(mounir) → review?(khuey)
Attached patch Patch v3 (obsolete) — Splinter Review
Attachment #640633 - Attachment is obsolete: true
Attachment #640633 - Flags: review?(khuey)
Attachment #643349 - Flags: review?(jonas)
Attached patch Patch v4 (obsolete) — Splinter Review
Attachment #643349 - Attachment is obsolete: true
Attachment #643349 - Flags: review?(jonas)
Attachment #644953 - Flags: review?(jonas)
Attached patch Patch v5Splinter Review
Attachment #644953 - Attachment is obsolete: true
Attachment #644953 - Flags: review?(jonas)
Attachment #648484 - Flags: review?(jonas)
Comment on attachment 648484 [details] [diff] [review]
Patch v5

Review of attachment 648484 [details] [diff] [review]:
-----------------------------------------------------------------

Does that make dom/ fully warning-free? If so, maybe we could add something in the Makfile rules that make dom/ subdirectories warning-free.
Attachment #648484 - Flags: review?(jonas) → review+
Attached patch More fixesSplinter Review
The static assertions are because of clang errors like:

../../../dom/indexedDB/OpenDatabaseHelper.cpp:27:1: error: unused function 'pr_static_assert' [-Werror,-Wunused-function]
PR_STATIC_ASSERT(JS_STRUCTURED_CLONE_VERSION == 1);
^
../../dist/include/prtypes.h:535:17: note: expanded from macro 'PR_STATIC_ASSERT'
    extern void pr_static_assert(int arg[(condition) ? 1 : -1])
                ^
1 error generated.
Attachment #649332 - Flags: review?(mounir)
Attachment #649332 - Flags: review?(mounir) → review+
https://hg.mozilla.org/mozilla-central/rev/1bbc0b65dffb
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
This is now causing 

dom/base/nsDOMClassInfo.cpp:9069:29: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

Casting 32 bit int to void *: tsk, tsk...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
This is on a x86-64 bit linux system.  

I'm confused as to why the buildbots didn't catch this--do we not turn on warnings-as-errors there?
These too:

dom/plugins/base/nsPluginNativeWindowGtk2.cpp:202:147: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

dom/plugins/ipc/PluginInstanceParent.cpp:409:48: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
Blocks: 781058
I'll fix those in bug 781058.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: