That's not good. I'll look at this. I use Python(and have done work in gnubgmodule.c) but don't think I build with -Warray-bounds . I assume you have forced -Warray-bounds on for your builds? I hadn't seen these particular warnings before, so that's why I am asking.
On 13/05/2011 12:35 PM, Philippe Michel wrote: > I don't know if this is important (I don't use python and usually > compile with --without-python), but I get the warnings below on > gnubgmodule.c : > > > gnubgmodule.c:54:3: warning: array index of '1' indexes past the end > of an array (that contains 1 elements) > [-Warray-bounds] > PyTuple_SET_ITEM(b, 1, b1); > ^~~~~~~~~~~~~~~~~~~~~~~~~~ > In file included from gnubgmodule.c:24: > In file included from ./gnubgmodule.h:30: > In file included from /usr/local/include/python2.7/Python.h:99: > /usr/local/include/python2.7/tupleobject.h:54:37: note: instantiated > from: > #define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject > *)(op))->ob_item[i] = v) > ^ > /usr/local/include/python2.7/tupleobject.h:26:15: note: array > 'ob_item' declared here > PyObject *ob_item[1]; > ^ > gnubgmodule.c:705:2: warning: array index of '4' indexes past the end > of an array (that contains 1 elements) > [-Warray-bounds] > PyTuple_SET_ITEM(p, NUM_CUBEFUL_OUTPUTS, PyInt_FromLong(cp)); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In file included from gnubgmodule.c:24: > In file included from ./gnubgmodule.h:30: > In file included from /usr/local/include/python2.7/Python.h:99: > /usr/local/include/python2.7/tupleobject.h:54:37: note: instantiated > from: > #define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject > *)(op))->ob_item[i] = v) > ^ > /usr/local/include/python2.7/tupleobject.h:26:15: note: array > 'ob_item' declared here > PyObject *ob_item[1]; > ^ > gnubgmodule.c:706:2: warning: array index of '5' indexes past the end > of an array (that contains 1 elements) > [-Warray-bounds] > PyTuple_SET_ITEM(p, NUM_CUBEFUL_OUTPUTS+1, > PyString_FromString(GetCubeRecommendation(cp))); > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > In file included from gnubgmodule.c:24: > In file included from ./gnubgmodule.h:30: > In file included from /usr/local/include/python2.7/Python.h:99: > /usr/local/include/python2.7/tupleobject.h:54:37: note: instantiated > from: > #define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject > *)(op))->ob_item[i] = v) > ^ > /usr/local/include/python2.7/tupleobject.h:26:15: note: array > 'ob_item' declared here > PyObject *ob_item[1]; > ^ > 3 warnings generated. > > > > _______________________________________________ > Bug-gnubg mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/bug-gnubg > -- Michael Petch CApp::Sysware Consulting Ltd. OpenPGP FingerPrint=D81C 6A0D 987E 7DA5 3219 6715 466A 2ACE 5CAE 3304 _______________________________________________ Bug-gnubg mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-gnubg
