Having this code:
typedef volatile int COUNT;
COUNT functionOne( COUNT *number );
int functionTwo( int *number );
I can\'t get ri
I don't understand why you'd want to have the volatile
qualifier on a function return type. The variable that you assign the function's return value to should be typed as a volatile
instead.
Try making these changes:
typedef int COUNT_TYPE;
typedef volatile COUNT_TYPE COUNT;
COUNT_TYPE functionOne( COUNT number );
COUNT_TYPE functionTwo( COUNT_TYPE number );
And when calling functionTwo()
, explicitly cast the argument:
functionTwo( (COUNT_TYPE)arg );
HTH, Ashish.