Last Comment Bug 710997 - Possible double-assignment in PuppetWidget::DispatchPaintEvent()
: Possible double-assignment in PuppetWidget::DispatchPaintEvent()
Status: RESOLVED FIXED
[pvs-studio][good first bug][lang=c++...
:
Product: Core
Classification: Components
Component: Widget (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla12
Assigned To: Pranav Ravichandran [:pranavrc]
:
Mentors:
Depends on:
Blocks: 710966
  Show dependency treegraph
 
Reported: 2011-12-14 23:56 PST by Justin Dolske [:Dolske]
Modified: 2012-02-01 13:57 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Proposed patch (778 bytes, patch)
2011-12-21 01:42 PST, Pranav Ravichandran [:pranavrc]
cjones.bugs: review+
Details | Diff | Review

Description Justin Dolske [:Dolske] 2011-12-14 23:56:03 PST
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;
Comment 1 Pranav Ravichandran [:pranavrc] 2011-12-21 01:42:54 PST
Created attachment 583428 [details] [diff] [review]
Proposed patch
Comment 2 Josh Matthews [:jdm] 2011-12-21 10:29:56 PST
Comment on attachment 583428 [details] [diff] [review]
Proposed patch

Thanks Pranav!
Comment 3 Josh Matthews [:jdm] 2011-12-21 10:41:35 PST
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 5 Ed Morley [:emorley] 2011-12-22 03:53:29 PST
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 :-)

Note You need to log in before you can comment on or make changes to this bug.