Closed Bug 605174 Opened 14 years ago Closed 13 years ago

Fix build warnings in dom/

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: Ms2ger, Assigned: emorley)

References

(Blocks 1 open bug)

Details

(Whiteboard: [build_warning])

Attachments

(1 file, 5 obsolete files)

Attached patch Patch v1 (obsolete) — Splinter Review
Mainly uninitialized and unused variables.
Flags: in-testsuite-
Attachment #484011 - Flags: review?(peterv)
Attached patch Patch v2 (obsolete) — Splinter Review
Merged to tip
Attachment #484011 - Attachment is obsolete: true
Attachment #485126 - Flags: review?(peterv)
Attachment #484011 - Flags: review?(peterv)
Attached patch Patch v2.1 (obsolete) — Splinter Review
Merged to tip.
Attachment #485126 - Attachment is obsolete: true
Attachment #492050 - Flags: review?(peterv)
Attachment #485126 - Flags: review?(peterv)
Blocks: buildwarning
Attached patch Patch v3 (obsolete) — Splinter Review
Updated to tip & some new warning fixes added.

Peter, ping for review (the previous review has been open for 10 months) - thanks :-)
Assignee: Ms2ger → bmo
Attachment #492050 - Attachment is obsolete: true
Attachment #557472 - Flags: review?(peterv)
Attachment #492050 - Flags: review?(peterv)
OS: Linux → All
Hardware: x86 → All
Just spotted an #ifdef DEBUG instance that can be converted to DebugOnly in one of the dom/ipc/ContentParent.cpp hunks. Will make the change after first pass review.
Comment on attachment 557472 [details] [diff] [review]
Patch v3

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

I don't think we should change for bogus warnings, rest looks ok.

::: dom/base/nsDOMClassInfo.cpp
@@ +7342,5 @@
>  static PRBool
>  GetBindingURL(Element *aElement, nsIDocument *aDocument,
>                nsCSSValue::URL **aResult)
>  {
> +  *aResult = nsnull;

Bogus warning, I don't see why we should change this.

@@ +8448,5 @@
>        return JS_TRUE;
>      }
>    }
>  
> +  nsHTMLDocument* doc = GetDocument(cx, obj);

Follow existing style, don't change this.

@@ +8450,5 @@
>    }
>  
> +  nsHTMLDocument* doc = GetDocument(cx, obj);
> +  nsISupports* result = NULL;
> +  nsWrapperCache* cache = NULL;

Bogus warning, I don't see why we should change this.

::: dom/base/nsDOMException.cpp
@@ +87,5 @@
>      NS_WARNING("Trying to create an exception for the wrong error module."); \
>      return NS_ERROR_FAILURE;                                                 \
>    }                                                                          \
> +  const char* name = NULL;                                                   \
> +  const char* message = NULL;                                                \

Fix this in NSResultToNameAndMessage.

::: dom/base/nsGlobalWindow.cpp
@@ +9208,5 @@
>      ++gRunningTimeoutDepth;
>      ++mTimeoutFiringDepth;
>  
>      PRBool trackNestingLevel = !timeout->mIsInterval;
> +    PRUint32 nestingLevel = 0;

Bogus warning, I don't see why we should change this.

::: dom/base/nsScriptNameSpaceManager.cpp
@@ +294,5 @@
>    nsCAutoString category_entry;
>    const char* if_name;
>    nsCOMPtr<nsISupports> entry;
>    nsCOMPtr<nsIInterfaceInfo> if_info;
> +  PRBool found_old = PR_FALSE, dom_prefix;

Bogus warning, I don't see why we should change this.

::: dom/indexedDB/LazyIdleThread.cpp
@@ +512,5 @@
>  NS_IMETHODIMP
>  LazyIdleThread::AfterProcessNextEvent(nsIThreadInternal* /* aThread */,
>                                        PRUint32 /* aRecursionDepth */)
>  {
> +  bool shouldNotifyIdle = false;

Bogus warning, I don't see why we should change this.

::: dom/ipc/ContentParent.cpp
@@ +488,5 @@
>  
>      nsCOMPtr<nsISimpleEnumerator> enumerator;
> +#ifdef DEBUG
> +    nsresult rv = 
> +#endif

DebugOnly<...>?

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

Bogus warning, I don't see why we should change this.
Attachment #557472 - Flags: review?(peterv) → review+
Attached patch Patch for checkin (obsolete) — Splinter Review
Changes made for review comments, carrying forwards r+.

Builds fine locally, sent to try:
https://tbpl.mozilla.org/?tree=Try&usebuildbot=1&rev=db82af19db7c
Attachment #557472 - Attachment is obsolete: true
As comment 6 patch, but with dom/plugins/ipc/PluginModuleChild.cpp @@ -254,18 +252,17 @@ PluginModuleChild::Init(const std::strin hunk added to prevent OSX build error + the nsIDOMXULMultSelectCntrlEl.idl hunk removed as it caused win Moth and crashtest failures.

Carrying forwards r+.
Attachment #560716 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/d4826f400c89
Status: ASSIGNED → RESOLVED
Closed: 13 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: