Possible double-assignment in PuppetWidget::DispatchPaintEvent()

RESOLVED FIXED in mozilla12

Status

()

Core
Widget
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Dolske, Assigned: pranavrc)

Tracking

(Blocks: 1 bug)

unspecified
mozilla12
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
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;
(Reporter)

Updated

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

Comment 1

6 years ago
Created attachment 583428 [details] [diff] [review]
Proposed patch

Comment 2

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

Comment 3

6 years ago
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!

Comment 4

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/15b9a0278499

Comment 5

6 years ago
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
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.