pthread_sleepon_wait( ) question

Hi, I declare a variable volatile int, like the training course, to setup a
thread with sleepon.

I don’t know why the compiler told the following:

warning: passing arg1 of ‘pthread_sleepon_wait’ discards qualifiers from
pointer target type.

Any idea?

If I don’t set the variable volatile, no warning…

Thanks