[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #48043] Fix warning of uninitialised variable
From: |
Robert Jenssen |
Subject: |
[Octave-bug-tracker] [bug #48043] Fix warning of uninitialised variable in __ilu__.cc |
Date: |
Sat, 28 May 2016 06:38:26 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.63 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?48043>
Summary: Fix warning of uninitialised variable in __ilu__.cc
Project: GNU Octave
Submitted by: morgawr
Submitted on: Sat 28 May 2016 06:38:24 GMT
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Other
Status: None
Assigned to: None
Originator Name: Robert Jenssen
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
Using Fedora23 (kernel 4.4.9-300.fc23.x86_64 and gcc-5.3.1 20160406) to
compile the development sources (HG-ID is 7e981549dd9b+) with:
export CXXFLAGS=-O3
../configure --disable-java --without-fltk
make -j 6
gives:
../libinterp/corefcn/__ilu__.cc: In function ‘void ilu_0(octave_matrix_t&,
std::__cxx11::string) [with octave_matrix_t = SparseMatrix; T = double;
std::__cxx11::string = std::__cxx11::basic_string<char>]’:
../libinterp/corefcn/__ilu__.cc:99:19: warning: ‘tl’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
data[jw] -= tl * data[jj];
A small change removes the warning. "hg diff libinterp/corefcn/__ilu__.cc"
gives:
diff -r 7e981549dd9b libinterp/corefcn/__ilu__.cc
--- a/libinterp/corefcn/__ilu__.cc Fri May 27 21:01:17 2016 -0400
+++ b/libinterp/corefcn/__ilu__.cc Sat May 28 16:30:00 2016 +1000
@@ -42,7 +42,8 @@
{
const octave_idx_type n = sm.cols ();
octave_idx_type j1, j2, jrow, jw, i, j, k, jj;
- T tl, r;
+ T r;
+ T tl=0;
enum {OFF, ROW, COL};
char opt;
The resulting build passes "make check".
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?48043>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #48043] Fix warning of uninitialised variable in __ilu__.cc,
Robert Jenssen <=