patchGNU Octave - Patches: patch #8567, Remove unnecessary build warnings...

 
 

patch #8567: Remove unnecessary build warnings in Faddeeva.cc.

Submitter:  Kai Torben Ohlhus <siko1056>
Submitted:  Mon 10 Nov 2014 03:51:57 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 11 Nov 2014 11:33:31 AM UTC, comment #2: 

Hello Rik,

I freshly pulled the repository and built it again, but your warnings regarding the _ilu_.cc don't appear on my machine. The kron.cc warning is the same as in chNDArray.cc and I wrote a more
aggressive patch removing much deprecate stuff.

(file #32417)

Kai Torben Ohlhus <siko1056>
Group Member
Mon 10 Nov 2014 10:40:18 PM UTC, comment #1: 

I modified the commit message to mention the function within the file which was modified.  The new message is:


Faddeeva.cc: Fix compilation warnings.

Faddeeva.cc (FADDEEVA(Dawson)): Avoid shadowing variable 'x2'.
Faddeeva.cc (erfcx_y100): Replace old-style cast operator with C++ static_cast.
Faddeeva.cc (w_im_y100): Replace old-style cast operator with C++ static_cast.


Otherwise, it looked good and I committed it to the default branch.

Do you see an easy solution for these remaining warnings?


corefcn/kron.cc:141:43: warning: 'Array<T>::Array(octave_idx_type) [with T = int, octave_idx_type = int]' is deprecated (declared at ../liboctave/array/Array.h:184) [-Wdeprecated-declarations]
dldfcn/__ilu__.cc:671:23: warning: 'partial_row_sum' may be used uninitialized in this function [-Wuninitialized]
dldfcn/__ilu__.cc:678:25: warning: 'partial_col_sum' may be used uninitialized in this function [-Wuninitialized]
dldfcn/__ilu__.cc:710:19: warning: 'tl' may be used uninitialized in this function [-Wuninitialized]


Rik <rik5>
Group administrator
Mon 10 Nov 2014 03:51:57 PM UTC, original submission:  

The attached patch addresses the following warnings:

liboctave/cruft/Faddeeva/Faddeeva.cc:587:14: warning: declaration of 'x2' shadows a previous local [-Wshadow]
        double x2 = x*x, y2 = y*y;                                              
               ^                                                                
liboctave/cruft/Faddeeva/Faddeeva.cc:567:12: note: shadowed declaration is here
      double x2 = x*x;                                                          
             ^                                                                  
liboctave/cruft/Faddeeva/Faddeeva.cc: In function 'double erfcx_y100(double)':
liboctave/cruft/Faddeeva/Faddeeva.cc:1013:17: warning: use of old-style cast [-Wold-style-cast]
    switch ((int) y100) {                                                       
                  ^                                                             
liboctave/cruft/Faddeeva/Faddeeva.cc: In function 'double w_im_y100(double, double)':
liboctave/cruft/Faddeeva/Faddeeva.cc:1457:17: warning: use of old-style cast [-Wold-style-cast]
    switch ((int) y100) {                                                       
                  ^

Kai Torben Ohlhus <siko1056>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #32417:  liboctave.diff added by siko1056 (11KiB - text/x-patch)
file #32398:  faddeeva.cc.diff added by siko1056 (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by siko1056 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-11-11 siko1056 Attached File- Added liboctave.diff, #32417
    2014-11-10 rik5 StatusNone Done
        Open/ClosedOpen Closed
    2014-11-10 siko1056 Attached File- Added faddeeva.cc.diff, #32398

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code