Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

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

Edited by: Koldo - Jan-31-14 13:11:23

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. current/smile.

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.

There are 0 guests and 0 other users also viewing this topic
You are here: