Closed Bug 710997 Opened 13 years ago Closed 13 years ago

Possible double-assignment in PuppetWidget::DispatchPaintEvent()

Categories

(Core :: Widget, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: Dolske, Assigned: pranavrc)

References

Details

(Whiteboard: [pvs-studio][good first bug][lang=c++][mentor=felipe])

Attachments

(1 file)

From http://www.viva64.com/en/a/0078/,
21st section in http://www.viva64.com/external-pictures/txt/mozilla-test.txt

V519 The 'event.refPoint.x' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 545, 546.
puppetwidget.cpp 546

nsresult
PuppetWidget::DispatchPaintEvent()
{
  ...
  event.refPoint.x = dirtyRect.x;
  event.refPoint.x = dirtyRect.y;
  ...
}

I think there could be written like this.
event.refPoint.y = dirtyRect.y;
Blocks: 710966
Whiteboard: [pvs-studio] → [pvs-studio][good first bug][lang=c++]
Whiteboard: [pvs-studio][good first bug][lang=c++] → [pvs-studio][good first bug][lang=c++][mentor=felipe]
Attached patch Proposed patchSplinter Review
Comment on attachment 583428 [details] [diff] [review]
Proposed patch

Thanks Pranav!
Attachment #583428 - Flags: review?(jones.chris.g)
Attachment #583428 - Flags: review?(jones.chris.g) → review+
Pranav, I'm going to check in this patch to the tree. In future, could you follow the directions at https://developer.mozilla.org/en/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F which will make it easier for other people to check in you patches? Thanks in advance!
https://hg.mozilla.org/mozilla-central/rev/15b9a0278499

Pranav congrats on your first patch in the tree! 

Hope to see you on IRC in #developers soon (see https://wiki.mozilla.org/IRC#Getting_Started for details). If you'd like to fix another bug (it would be awesome if you did!) but need some inspiration, pop on & say hi - and we'll find something for you :-)
Assignee: nobody → prp.1111
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: