bugGNU Octave - Bugs: bug #40581, Fix using uninitialised variables...

 
 

bug #40581: Fix using uninitialised variables as parameter in __init_fltk__.cc (pixel2status)

Submitted by:  PrasannaKumar Muralidharan <prasannatsm>
Submitted on:  Thu 14 Nov 2013 05:08:38 PM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Other
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 18 Nov 2013 08:07:22 AM UTC, comment #2:

Its a good idea to use NaN and a good learning point for me. Thanks.

PrasannaKumar Muralidharan <prasannatsm>
Sun 17 Nov 2013 11:45:09 PM UTC, comment #1:

I applied your changeset here (http://hg.savannah.gnu.org/hgweb/octave/rev/265f9186e543). I modified it slightly. Octave's convention is not to do simultaneous declaration and initialization of variables for more than one variable on a line. So,

is good, but

is discouraged. To solve this I just broke up the declaration and initialization into two lines.

Secondly, I used the value NaN, rather than 0, to reflect the fact the value is unknown, rather than known to be 0.

Thanks for catching this imperfect code.

Rik <rik5>
Project Administrator
Thu 14 Nov 2013 05:08:38 PM UTC, original submission:
PrasannaKumar Muralidharan <prasannatsm>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by ttl (Updated the item)
  • -unavailable- added by prasannatsm (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 17 Nov 2013 11:45:09 PM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Thu 14 Nov 2013 06:29:34 PM UTCttlCategoryNone=>Plotting with OpenGL
      SummaryFix using uninitialised variables as parameter=>Fix using uninitialised variables as parameter in _init_fltk_.cc (pixel2status)
    Thu 14 Nov 2013 05:08:38 PM UTCprasannatsmAttached File-=>Added fix_uninitialised_parameters.diff, #29619

    Back to the top


    Powered by Savane 3.1-cleanup1