Commit d482cd29 by xiongziliang

修复编译警告问题

parent b92e8376
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
#include <cstdlib>
#include "HttpClient.h" #include "HttpClient.h"
#include "Rtsp/Rtsp.h" #include "Rtsp/Rtsp.h"
......
...@@ -272,7 +272,7 @@ protected: ...@@ -272,7 +272,7 @@ protected:
* @param recvedSize 已收数据大小(包含本次数据大小),当其等于totalSize时将触发onResponseCompleted回调 * @param recvedSize 已收数据大小(包含本次数据大小),当其等于totalSize时将触发onResponseCompleted回调
* @param totalSize 总数据大小 * @param totalSize 总数据大小
*/ */
virtual void onResponseBody(const char *buf,size_t size,size_t recvedSize,size_t totalSize){ virtual void onResponseBody(const char *buf,int64_t size,int64_t recvedSize,int64_t totalSize){
DebugL << size << " " << recvedSize << " " << totalSize; DebugL << size << " " << recvedSize << " " << totalSize;
}; };
......
...@@ -79,7 +79,7 @@ int64_t HttpDownloader::onResponseHeader(const string& status,const HttpHeader& ...@@ -79,7 +79,7 @@ int64_t HttpDownloader::onResponseHeader(const string& status,const HttpHeader&
return -1; return -1;
} }
void HttpDownloader::onResponseBody(const char* buf, size_t size, size_t recvedSize, size_t totalSize) { void HttpDownloader::onResponseBody(const char* buf, int64_t size, int64_t recvedSize, int64_t totalSize) {
if(_saveFile){ if(_saveFile){
fwrite(buf,size,1,_saveFile); fwrite(buf,size,1,_saveFile);
} }
......
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
} }
private: private:
int64_t onResponseHeader(const string &status,const HttpHeader &headers) override; int64_t onResponseHeader(const string &status,const HttpHeader &headers) override;
void onResponseBody(const char *buf,size_t size,size_t recvedSize,size_t totalSize) override; void onResponseBody(const char *buf,int64_t size,int64_t recvedSize,int64_t totalSize) override;
void onResponseCompleted() override; void onResponseCompleted() override;
void onDisconnect(const SockException &ex) override; void onDisconnect(const SockException &ex) override;
void closeFile(); void closeFile();
......
...@@ -40,7 +40,7 @@ int64_t HttpRequester::onResponseHeader(const string &status,const HttpHeader &h ...@@ -40,7 +40,7 @@ int64_t HttpRequester::onResponseHeader(const string &status,const HttpHeader &h
return 0; return 0;
} }
void HttpRequester::onResponseBody(const char *buf,size_t size,size_t recvedSize,size_t totalSize) { void HttpRequester::onResponseBody(const char *buf,int64_t size,int64_t recvedSize,int64_t totalSize) {
_strRecvBody.append(buf,size); _strRecvBody.append(buf,size);
} }
......
...@@ -42,7 +42,7 @@ public: ...@@ -42,7 +42,7 @@ public:
void clear() override ; void clear() override ;
private: private:
int64_t onResponseHeader(const string &status,const HttpHeader &headers) override; int64_t onResponseHeader(const string &status,const HttpHeader &headers) override;
void onResponseBody(const char *buf,size_t size,size_t recvedSize,size_t totalSize) override; void onResponseBody(const char *buf,int64_t size,int64_t recvedSize,int64_t totalSize) override;
void onResponseCompleted() override; void onResponseCompleted() override;
void onDisconnect(const SockException &ex) override; void onDisconnect(const SockException &ex) override;
private: private:
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include <cstdlib>
#include "Util/util.h" #include "Util/util.h"
#include "Util/logger.h" #include "Util/logger.h"
#include "Network/sockutil.h" #include "Network/sockutil.h"
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
#include <cstdlib>
#include "RtspSplitter.h" #include "RtspSplitter.h"
namespace mediakit{ namespace mediakit{
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论