On 05/02/2016 12:59 PM, Daniel J Sebald wrote:
I saw the following warnings during compilation. They look kind of
troublesome:
/home/sebald/octave/octave/octave/liboctave/numeric/schur.cc: In member
function 'octave_idx_type schur<T>::init(const T&, const string&, bool)
[with T = Matrix; octave_idx_type = int; std::string =
std::basic_string<char>]':
/home/sebald/octave/octave/octave/liboctave/numeric/schur.cc:176:19:
warning: variable 'selector' might be clobbered by 'longjmp' or 'vfork'
[-Wclobbered]
double_selector selector = 0;
Hmm, very strange construct. double_selector is a function type:
typedef octave_idx_type (*double_selector) (const double&, const double&);
so I can see why the complaint pertains to long-jumping and forking. I
don't quite understand the issue though. The intention is to select the
function that will be run for selecting:
double_selector selector = 0;
if (ord_char == 'A' || ord_char == 'a')
selector = select_ana<double>;
else if (ord_char == 'D' || ord_char == 'd')
selector = select_dig<double>;
else
selector = 0;
(Note that the "double_selector selector = 0;" and third case "selector
= 0" is redundant.) The prototype has two input variables, but the
template assigned to it has just <double>, but that doesn't seem like a
program flow issue. Does the type-definition for the (*double_selector)
need a "long" specification somehow?
Dan