Closed Bug 1287739 Opened 3 years ago Closed 3 years ago

test_deadlock_detector.cpp:210: len might be undefined

Categories

(Toolkit :: Storage, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: tzimmermann, Assigned: tzimmermann)

Details

Attachments

(1 file, 1 obsolete file)

A warning is generated by the compiler.
Comment on attachment 8772369 [details] [diff] [review]
[01] Bug 1287739: Always set 'len' variable in storage test

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

::: storage/test/test_deadlock_detector.cpp
@@ +202,5 @@
>                  else if (PR_POLL_HUP & pollfds[i].out_flags) {
>                      len = 0;
>                  }
>                  else {
> +                    len = 0;

This would do but...
There is the same code at http://searchfox.org/mozilla-central/source/xpcom/tests/TestDeadlockDetector.cpp#159
and looks like you already fixed that code, differently.
Is there a reason to not just have the same identical code here? It's clear the 2 codes have been copy pasted, we should keep them in sync.
Attachment #8772369 - Flags: review?(mak77)
That makes sense.

Changes since v1:

  - fixed warning as in related code
Attachment #8772369 - Attachment is obsolete: true
Attachment #8772772 - Flags: review?(mak77)
Comment on attachment 8772772 [details] [diff] [review]
[01] Bug 1287739: Always set 'len' variable in storage test (v2)

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

Thanks
Attachment #8772772 - Flags: review?(mak77) → review+
Pushed by tdz@users.sourceforge.net:
https://hg.mozilla.org/integration/mozilla-inbound/rev/44888990d2df
Always set 'len' variable in storage test, r=mak
https://hg.mozilla.org/mozilla-central/rev/44888990d2df
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.