diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index 522f664a7..4ecf360f0 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -2808,8 +2808,8 @@ tr_torrentDeleteLocalData( tr_torrent * tor, tr_fileFunc fileFunc ) struct LocationData { tr_bool move_from_old_location; - int * setme_state; - double * setme_progress; + volatile int * setme_state; + volatile double * setme_progress; char * location; tr_torrent * tor; }; @@ -2905,11 +2905,11 @@ setLocation( void * vdata ) } void -tr_torrentSetLocation( tr_torrent * tor, - const char * location, - tr_bool move_from_old_location, - double * setme_progress, - int * setme_state ) +tr_torrentSetLocation( tr_torrent * tor, + const char * location, + tr_bool move_from_old_location, + volatile double * setme_progress, + volatile int * setme_state ) { struct LocationData * data; diff --git a/libtransmission/transmission.h b/libtransmission/transmission.h index 4f8f54186..1095cef60 100644 --- a/libtransmission/transmission.h +++ b/libtransmission/transmission.h @@ -1068,11 +1068,11 @@ enum * will be clobberred s.t. additional files being added will be saved * to the torrent's downloadDir. */ -void tr_torrentSetLocation( tr_torrent * torrent, - const char * location, - tr_bool move_from_previous_location, - double * setme_progress, - int * setme_state ); +void tr_torrentSetLocation( tr_torrent * torrent, + const char * location, + tr_bool move_from_previous_location, + volatile double * setme_progress, + volatile int * setme_state ); uint64_t tr_torrentGetBytesLeftToAllocate( const tr_torrent * torrent );