# HG changeset patch # User reimar # Date 1304803736 0 # Node ID 62ab329812c913cdbcd0fd5d33018a3e66074a56 # Parent f60b1fd077128d3cf1b55f4bffb32d8613c98504 Avoid warnings about discarding volatile. In practice this should not really make a difference, but the code is not significantly worse and it is more correct. diff -r f60b1fd07712 -r 62ab329812c9 stream/cache2.c --- a/stream/cache2.c Sat May 07 21:23:22 2011 +0000 +++ b/stream/cache2.c Sat May 07 21:28:56 2011 +0000 @@ -255,6 +255,8 @@ } static int cache_execute_control(cache_vars_t *s) { + double double_res; + unsigned uint_res; static unsigned last; int quit = s->control == -2; if (quit || !s->stream->control) { @@ -277,7 +279,8 @@ case STREAM_CTRL_GET_CURRENT_TIME: case STREAM_CTRL_SEEK_TO_TIME: case STREAM_CTRL_GET_ASPECT_RATIO: - s->control_res = s->stream->control(s->stream, s->control, &s->control_double_arg); + s->control_res = s->stream->control(s->stream, s->control, &double_res); + s->control_double_arg = double_res; break; case STREAM_CTRL_SEEK_TO_CHAPTER: case STREAM_CTRL_GET_NUM_CHAPTERS: @@ -285,7 +288,8 @@ case STREAM_CTRL_GET_NUM_ANGLES: case STREAM_CTRL_GET_ANGLE: case STREAM_CTRL_SET_ANGLE: - s->control_res = s->stream->control(s->stream, s->control, &s->control_uint_arg); + s->control_res = s->stream->control(s->stream, s->control, &uint_res); + s->control_uint_arg = uint_res; break; default: s->control_res = STREAM_UNSUPPORTED;