Skip to content

Commit

Permalink
fix warning for gcc under centos5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Nov 4, 2013
1 parent 647132b commit c9a9f4b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/app/htl_app_hls_load.cpp
Expand Up @@ -58,7 +58,7 @@ int StHlsTask::ProcessTask(){
statistic->OnTaskError(GetId(), 0);

Error("http client process m3u8 failed. ret=%d", ret);
st_usleep(error_seconds * 1000 * 1000);
st_usleep((st_utime_t)(error_seconds * 1000 * 1000));
continue;
}

Expand Down Expand Up @@ -153,7 +153,7 @@ int StHlsTask::DownloadTS(StHttpClient& client, M3u8TS& ts){
statistic->OnSubTaskStart(GetId(), ts.ts_url);

if((ret = client.DownloadString(&url, NULL)) != ERROR_SUCCESS){
statistic->OnSubTaskError(GetId(), ts.duration);
statistic->OnSubTaskError(GetId(), (int)ts.duration);

Error("http client download ts file %s failed. ret=%d", url.GetUrl(), ret);
return ret;
Expand All @@ -164,7 +164,7 @@ int StHlsTask::DownloadTS(StHttpClient& client, M3u8TS& ts){
url.GetUrl(), ts.duration, delay_seconds, client.GetResponseHeader()->content_length, sleep_ms);
st_usleep(sleep_ms * 1000);

statistic->OnSubTaskEnd(GetId(), ts.duration);
statistic->OnSubTaskEnd(GetId(), (int)ts.duration);

return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/htl_app_http_load.cpp
Expand Up @@ -49,7 +49,7 @@ int StHttpTask::ProcessTask(){
statistic->OnTaskError(GetId(), 0);

Error("http client get url failed. ret=%d", ret);
st_usleep(error_seconds * 1000 * 1000);
st_usleep((st_utime_t)(error_seconds * 1000 * 1000));
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/htl_app_rtmp_load.cpp
Expand Up @@ -49,7 +49,7 @@ int StRtmpTask::ProcessTask(){
statistic->OnTaskError(GetId(), 0);

Error("rtmp client dump url failed. ret=%d", ret);
st_usleep(error_seconds * 1000 * 1000);
st_usleep((st_utime_t)(error_seconds * 1000 * 1000));
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion src/os/htl_os_st.cpp
Expand Up @@ -98,7 +98,7 @@ void StStatistic::DoReport(double sleep_ms){
getpid(), threads, alive, duration/1000.0, avarage_duration, read_mbps, write_mbps,
tasks, err_tasks, sub_tasks, err_sub_tasks);

st_usleep(sleep_ms * 1000);
st_usleep((st_utime_t)(sleep_ms * 1000));
}
}

Expand Down

0 comments on commit c9a9f4b

Please sign in to comment.