History.cpp:2716:48: warning: value computed is not used [-Wunused-value]

RESOLVED FIXED in mozilla25

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

(Blocks: 1 bug, {regression})

24 Branch
mozilla25
regression
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(firefox24 affected)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
New build warning:
toolkit/components/places/History.cpp:2716:48: warning: value computed is not used [-Wunused-value]
        *placesInfo.AppendElement(VisitData(uri));
                                                 ^

I believe it's telling us that the "*" there is useless. (We're dereferencing the return value of AppendElement, and then not doing anything with the result.)

This line was added here:
 http://hg.mozilla.org/mozilla-central/rev/734147446def#l3.942
for bug 834539.
(Assignee)

Comment 1

5 years ago
This was likely just a copypaste remnant from this other line:
  VisitData& placeInfo = *placesInfo.AppendElement(VisitData());
a few lines higher up (where we dereference and then *do* use the result).
(Assignee)

Comment 2

5 years ago
Created attachment 769012 [details] [diff] [review]
fix v1
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #769012 - Flags: review?
(Assignee)

Updated

5 years ago
Attachment #769012 - Flags: review? → review?(mano)
(Assignee)

Updated

5 years ago
OS: Linux → All
Hardware: x86_64 → All
Version: unspecified → Trunk
Comment on attachment 769012 [details] [diff] [review]
fix v1

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

thanks!
Attachment #769012 - Flags: review?(mano) → review+
(Assignee)

Comment 4

5 years ago
Landed:  https://hg.mozilla.org/integration/mozilla-inbound/rev/fdf7cf309750

...but that had the wrong reviewer in the commit message (I didn't notice in my bugmail that it was mak instead of mano who r+'d it), so I backed out and relanded (as DONTBUILD) to update the commit message:

backout: https://hg.mozilla.org/integration/mozilla-inbound/rev/6f996afe0d61
re-land: https://hg.mozilla.org/integration/mozilla-inbound/rev/d28947c37c8f
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/d28947c37c8f
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25

Updated

5 years ago
status-firefox24: --- → affected
Keywords: regression
Version: Trunk → 24 Branch
You need to log in before you can comment on or make changes to this bug.