When building msolve version 0.9.5, gcc warns:
In file included from msolve.c:25,
from libmsolve.c:35:
lifting-gb.c: In function 'verif_lifted_basis':
lifting-gb.c:1102:36: warning: the comparison will always evaluate as 'true' for the pointer operand in 'modgbs->modpolys + (sizetype)((long unsigned int)k * 48)' must not be NULL [-Waddress]
1102 | if(modgbs->modpolys[k] != NULL){
| ^~
The variable modgbs has type gb_modpoly_t, so the type of modgbs->modpolys is:
modpolys_t *modpolys; /* array of polynomials modulo primes */
where the modpolys_t type is:
typedef modpolys_struct modpolys_t[1];
That is, modgbs->modpolys is a pointer to an array, where each element is an array of modpolys_struct of length 1. The code that the compiler warns about seems to have been written with the belief that modgbs->modpolys is an array of pointers to modpolys_struct objects. It isn't.
When building msolve version 0.9.5, gcc warns:
The variable
modgbshas typegb_modpoly_t, so the type ofmodgbs->modpolysis:where the
modpolys_ttype is:That is,
modgbs->modpolysis a pointer to an array, where each element is an array ofmodpolys_structof length 1. The code that the compiler warns about seems to have been written with the belief thatmodgbs->modpolysis an array of pointers tomodpolys_structobjects. It isn't.