These look relatively harmless. They seem to be coming from this typemap:

typemaps/enumint.swg:%typemap(in,fragment=SWIG_AsVal_frag(int),noblock=1) const enum SWIGTYPE & (int val, int ecode, $basetype temp) { 

I'd imagine initialising the val to zero would be the easiest fix.

Cheers,
Karl


On 9 March 2014 00:48, William S Fulton <wsf@fultondesigns.co.uk> wrote:
Newer versions of Octave are generating lots -Wmaybe-uninitialized warnings in the test-suite and examples.

I think this is a spurious compiler warning, but would like a 2nd opinion from some Octave folk before suppressing the warning. Karl, what do you think? Any ideas to work around it? It seems to be occurring at least on 64 bit Linux and gcc-4.8 and fewer of them on 32 bit. You can see it in the SUSE testing, eg:https://build.opensuse.org/build/home:kwk:swig/openSUSE_13.1/x86_64/swig-unstable/_log  ...

[  506s] checking Examples/octave/extend
[  513s] In file included from example_wrap.cxx:2314:0:
[  513s] example.h: In function 'octave_value_list _wrap_EmployeeList_get_item(const octave_value_list&, int)':
[  513s] example.h:45:16: warning: 'val2' may be used uninitialized in this function [-Wmaybe-uninitialized]
[  513s]    return list[i];
[  513s]                 ^
[  513s] example_wrap.cxx:4065:7: note: 'val2' was declared here
[  513s]    int val2 ;
[  513s]        ^
[  519s] checking Examples/octave/funcptr
[  525s] example_wrap.cxx: In function 'octave_value_list _wrap_do_op(const octave_value_list&, int)':
[  525s] example_wrap.cxx:2241:38: warning: 'val2' may be used uninitialized in this function [-Wmaybe-uninitialized]
[  525s]    result = (int)do_op(arg1,arg2,arg3);
[  525s]                                       ^
[  525s] example_wrap.cxx:2241:38: warning: 'val1' may be used uninitialized in this function [-Wmaybe-uninitialized]


William