- Index
- » Developer
- » OpenModelica development
- » Warning in omc generated source file
Warning in omc generated source file
Warning in omc generated source file
Hello all
Yesterday I updated OpenModelica and now this warning appears when running omc. That file is automatically generated by omc:
Code:
MyModel_05evt.c: In function 'MyModel_zeroCrossingDescription':
MyModel_05evt.c:69: warning: assignment discards qualifiers from pointer target type
That function contains this:
Code:
const char *MyModel_zeroCrossingDescription(int i, int **out_EquationIndexes)
{
static const char *res[] = {"terminal() and time > 0.1"};
static const int occurEqs0[] = {1,193};
static const int *occurEqs[] = {occurEqs0};
*out_EquationIndexes = occurEqs[i]; // Warning points here
return res[i];
}
Best regards
Koldo
Re: Warning in omc generated source file
This is not urgent.
My OMC used a newer gcc version because of a PATH problem.
Changing the PATH to run the OpenModelica supplied MinGW, the warning disappears, so this warning could appear in the future. .
Edit: I have provoked an OMC error and this warning appears again, so OMC hides gcc warnings and only shows them if there is also a gcc error.
In summary, posted warning exists in MinGW version supplied with OMC.
- Index
- » Developer
- » OpenModelica development
- » Warning in omc generated source file