Fix build warnings in dom/

RESOLVED FIXED in mozilla9

Status

()

Core
DOM
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: Ms2ger, Assigned: emorley)

Tracking

(Blocks: 1 bug)

Trunk
mozilla9
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [build_warning])

Attachments

(1 attachment, 5 obsolete attachments)

(Reporter)

Description

7 years ago
Created attachment 484011 [details] [diff] [review]
Patch v1

Mainly uninitialized and unused variables.
Flags: in-testsuite-
Attachment #484011 - Flags: review?(peterv)
(Reporter)

Comment 1

7 years ago
Created attachment 485126 [details] [diff] [review]
Patch v2

Merged to tip
Attachment #484011 - Attachment is obsolete: true
Attachment #485126 - Flags: review?(peterv)
Attachment #484011 - Flags: review?(peterv)
(Reporter)

Comment 2

7 years ago
Created attachment 492050 [details] [diff] [review]
Patch v2.1

Merged to tip.
Attachment #485126 - Attachment is obsolete: true
Attachment #492050 - Flags: review?(peterv)
Attachment #485126 - Flags: review?(peterv)
(Assignee)

Updated

6 years ago
Blocks: 187528
(Assignee)

Comment 3

6 years ago
Created attachment 557472 [details] [diff] [review]
Patch v3

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)
(Assignee)

Updated

6 years ago
OS: Linux → All
Hardware: x86 → All
(Assignee)

Comment 4

6 years ago
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+
(Assignee)

Comment 6

6 years ago
Created attachment 560716 [details] [diff] [review]
Patch for checkin

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
(Assignee)

Comment 7

6 years ago
Created attachment 560805 [details] [diff] [review]
Patch for checkin v2

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
(Assignee)

Comment 8

6 years ago
https://tbpl.mozilla.org/?tree=Try&usebuildbot=1&rev=84ba319a114a

https://hg.mozilla.org/integration/mozilla-inbound/rev/d4826f400c89
Target Milestone: --- → mozilla9
(Assignee)

Comment 9

6 years ago
https://hg.mozilla.org/mozilla-central/rev/d4826f400c89
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.