Commit 8f963303 authored by Alexab's avatar Alexab
Browse files

Some warnings removed #4

--HG--
branch : MockCompsTest
parent a7587412a19e
......@@ -36,34 +36,24 @@ SOURCES += \
../../../Core/Engine/Engine.cpp \
../../../Core/Engine/UADItem.cpp \
../../../Core/Engine/UAModel.cpp \
../../../Core/Engine/UBinaryEnvSerialize.cpp \
../../../Core/Engine/UComponent.cpp \
../../../Core/Engine/UComponentDescription.cpp \
../../../Core/Engine/UConnector.cpp \
../../../Core/Engine/UContainer.cpp \
../../../Core/Engine/UContainerDescription.cpp \
../../../Core/Engine/UController.cpp \
../../../Core/Engine/UELockPtr.cpp \
../../../Core/Engine/UELockVar.cpp \
../../../Core/Engine/UEngine.cpp \
../../../Core/Engine/UEnvException.cpp \
../../../Core/Engine/UEnvironment.cpp \
../../../Core/Engine/UEnvSupport.cpp \
../../../Core/Engine/UEPtr.cpp \
../../../Core/Engine/UItem.cpp \
../../../Core/Engine/UItemData.cpp \
../../../Core/Engine/ULibrary.cpp \
../../../Core/Engine/ULocalProperty.cpp \
../../../Core/Engine/ULogger.cpp \
../../../Core/Engine/UModule.cpp \
../../../Core/Engine/UNet.cpp \
../../../Core/Engine/UMockUNet.cpp \
../../../Core/Engine/UPointer.cpp \
../../../Core/Engine/UProperty.cpp \
../../../Core/Engine/UPropertyInput.cpp \
../../../Core/Engine/UPropertyIO.cpp \
../../../Core/Engine/UPropertyOutput.cpp \
../../../Core/Engine/UShare.cpp \
../../../Core/Engine/UComponentFactory.cpp \
../../../Core/Engine/UStorage.cpp \
../../../Core/Engine/UTime.cpp \
......@@ -80,24 +70,15 @@ SOURCES += \
../../../Core/Graphics/UGraphicsBinarySerialize.cpp \
../../../Core/Graphics/UGraphicsIO.cpp \
../../../Core/Graphics/UGraphicsXMLSerialize.cpp \
../../../Core/Math/MCamera.cpp \
../../../Core/Math/MCorrelation.cpp \
../../../Core/Math/MDKalmanFilter.cpp \
../../../Core/Math/MGeometry.cpp \
../../../Core/Math/MGraphics.cpp \
../../../Core/Math/MKalmanFilter.cpp \
../../../Core/Math/MMatrix.cpp \
../../../Core/Math/MMatrixBase.cpp \
../../../Core/Math/MUBinarySerialize.cpp \
../../../Core/Math/MUIOStream.cpp \
../../../Core/Math/MUXMLSerialize.cpp \
../../../Core/Math/MVector.cpp \
../../../Core/Math/UMath.cpp \
../../../Core/Math/UMath_lite.cpp \
../../../Core/Serialize/Serialize.cpp \
../../../Core/Serialize/Serialize_lite.cpp \
../../../Core/Serialize/UBinaryStdSerialize.cpp \
../../../Core/Serialize/UIOStream.cpp \
../../../Core/Serialize/USerStorage.cpp \
../../../Core/Serialize/USerStorageBinary.cpp \
../../../Core/Serialize/USerStorageXML.cpp \
......@@ -108,23 +89,18 @@ SOURCES += \
../../../Core/System/Qt/UGenericMutex.qt.cpp \
../../../Core/System/Qt/USharedMemoryLoader.qt.cpp \
../../../Core/Utilities/UException.cpp \
../../../Core/Utilities/UIniFile.cpp \
../../../Core/Utilities/UPtr.cpp \
../../../Core/Utilities/URegistry.cpp \
../../../Core/Utilities/USupport.cpp \
../../../Core/Utilities/Utilities.cpp \
../../../Core/Utilities/Utilities_lite.cpp \
../../../Core/Utilities/UTimeStamp.cpp \
../../../Core/Utilities/UTransferPacket.cpp \
../../../Core/Utilities/UTree.cpp \
../../../ThirdParty/ThirdParty.cpp \
../../../ThirdParty/xmlParser/xmlParser.cpp \
../../../ThirdParty/jpeg/JpegIntegration.cpp \
../../../ThirdParty/jpeg/jpgd.cpp \
../../../ThirdParty/jpeg/jpge.cpp \
../../../Deploy/Include/rdk_rpc.cpp \
../../../Deploy/Include/myrdk.cpp \
../../../Deploy/Include/rdk.cpp \
../../../Deploy/Include/rdk_cpp_initdll.cpp \
../../../Deploy/Include/rdk_engine_support.cpp \
../../../Deploy/Include/rdk_exceptions.ansi.cpp \
......@@ -134,9 +110,7 @@ SOURCES += \
../../../Deploy/Include/rdk_new.cpp \
../../../Core/Application/UIVisualController.cpp \
../../../Core/Engine/ULoggerEnv.cpp \
../../../Core/Application/UAppCore.cpp \
../../../Core/Application/UApplication.cpp \
../../../Core/Application/UBroadcasterInterface.cpp \
../../../Core/Application/UChannelProfiler.cpp \
../../../Core/Application/UEngineControl.cpp \
../../../Core/Application/UEngineControlThread.cpp \
......
......@@ -16,8 +16,8 @@ namespace RDK{
static
size_t write_response(void *ptr, size_t size, size_t nmemb, void *data)
{
FILE *writehere = (FILE *)data;
char* str = static_cast<char*>(ptr);
// FILE *writehere = (FILE *)data;
// char* str = static_cast<char*>(ptr);
//std::string s(str);
//std::cout<<str<<std::endl;
return nmemb;
......@@ -1751,7 +1751,7 @@ int UProjectDeployerQt::GetDeploymentState()
}
else
{
bool t = deployProcessingThread->isRunning();
// bool t = deployProcessingThread->isRunning();
return deployProcessingThread->GetDeploymentState();
}
}
......@@ -2220,7 +2220,7 @@ int UProjectDeployerQt::SetupProjectMockParametersVideoAnalysis()
bool *imseq_UseRelativePathFromConfig = imseq_cont->AccessPropertyData<bool>("UseRelativePathFromConfig");
bool *imseq_UseRelativePathFromDir = imseq_cont->AccessPropertyData<bool>("UseRelativePathFromDir");
int *test = imseq_cont->AccessPropertyData<int>("ReconnectTimeout");
// int *test = imseq_cont->AccessPropertyData<int>("ReconnectTimeout");
*imseq_Activity = true;
*imseq_Path = task_src_fullpath.toUtf8().constData();
......
......@@ -139,7 +139,7 @@ int UServerTransportTcpQt::GetServerBindingPort(void) const
if(server->isListening())
{
int p = server->serverPort();
return server->serverPort();
return p;
}
else
{
......@@ -163,9 +163,9 @@ void UServerTransportTcpQt::ServerNewConnection()
QString b = peer_name+":"+peer_port;
std::string bnd = b.toUtf8().constData();
bool b3 = Application!=NULL;
bool b1 = Application->GetServerControl()!=NULL;
bool b2 = Application->GetServerControl()->GetServerTransport()!=NULL;
// bool b3 = Application!=NULL;
// bool b1 = Application->GetServerControl()!=NULL;
// bool b2 = Application->GetServerControl()->GetServerTransport()!=NULL;
std::map<std::string, UServerSocketQt*>::iterator I = serverSockets.find(bnd);
......@@ -536,11 +536,11 @@ int UServerControlQt::UnRegisterMetadataReceiver(const std::string &address, int
// --------------------------
bool UServerControlQt::ASetNumChannels(int old_num)
{
#ifdef RDK_VIDEO
int num=Core_GetNumChannels();
//if(num<=0)
// return false;
#ifdef RDK_VIDEO
if(RdkApplication.GetProjectConfig().ProjectMode == 1 && VideoOutputForm)
{
if(VideoOutputForm->GetNumSources()<num)
......@@ -731,7 +731,7 @@ std::string URpcDecoderCommonQt::ARemoteCall(const std::string &cmd, RDK::USerSt
else
if(cmd == "GetChannelBroacaster")
{
int type=xml.ReadInteger("BroadcasterType",0);
// int type=xml.ReadInteger("BroadcasterType",0);
result.SelectNodeForce("Data");
result.SelectUp();
return_value=0;
......
......@@ -75,16 +75,16 @@ void UPerfomanceData::CalcMetrics(void)
AvgInterval+=double(curr.Interval);
if(MinDuration>curr.Duration)
MinDuration=curr.Duration;
MinDuration=double(curr.Duration);
if(MaxDuration<curr.Duration)
MaxDuration=curr.Duration;
MaxDuration=double(curr.Duration);
if(MinInterval>curr.Interval)
MinInterval=curr.Interval;
MinInterval=double(curr.Interval);
if(MaxInterval<curr.Interval)
MaxInterval=curr.Interval;
MaxInterval=double(curr.Interval);
}
if(!CalcDurationHistory.empty())
{
......
......@@ -844,6 +844,12 @@ bool UEngineControl::DeleteChannel(int index)
}
int del_res=Core_DelChannel(index);
if(del_res != RDK_SUCCESS)
{
MLog_LogMessage(RDK_GLOB_MESSAGE, RDK_EX_FATAL, (std::string("UEngineControl::DeleteChannel FAILED: ChNum=")+sntoa(index)).c_str());
return false;
}
int new_num=Core_GetNumChannels();
if(new_num == old_num)
......
......@@ -443,7 +443,8 @@ const char* URpcDecoderCommon::RemoteCall(const char *request, int &return_value
if(cmd == "PrepareProject")
{
std::string resp="";
int rs = GetApplication()->GetProjectDeployer()->PrepareProject(resp);
// int rs = GetApplication()->GetProjectDeployer()->PrepareProject(resp);
GetApplication()->GetProjectDeployer()->PrepareProject(resp);
response=resp;
return_value=0;
}
......@@ -462,7 +463,8 @@ const char* URpcDecoderCommon::RemoteCall(const char *request, int &return_value
{
std::string resp="";
std::cerr<<"Open prepared project!\n";
int rs = GetApplication()->GetProjectDeployer()->OpenPreparedProject(resp);
// int rs = GetApplication()->GetProjectDeployer()->OpenPreparedProject(resp);
GetApplication()->GetProjectDeployer()->OpenPreparedProject(resp);
std::cerr<<"Project opened successful!\n";
response=resp;
return_value=0;
......
......@@ -499,8 +499,8 @@ void UServerControl::SendCommandResponse(UServerTransport *transport, std::strin
packet.SetParam(0,dest);
for(size_t i=0;i<binary_data.size();i++)
{
packet.SetParamSize(i+1,int(binary_data[i].size()));
packet.SetParam(i+1,binary_data[i]);
packet.SetParamSize(int(i+1),int(binary_data[i].size()));
packet.SetParam(int(i+1),binary_data[i]);
}
RDK::UParamT buffer;
packet.Save(buffer);
......
#ifndef UCOMPONENT_FACTORY_CPP
#define UCOMPONENT_FACTORY_CPP
#include "UComponentFactory.h"
namespace RDK
......@@ -147,3 +150,5 @@ UComponentAbstractFactory::UComponentAbstractFactory(UStorage* storage)
}
#endif
......@@ -706,13 +706,17 @@ NameT UContainer::GetLongName(const UEPtr<UContainer> &mainowner) const
// Id
const NameT& UContainer::GetComponentName(const UId &id) const
{
for(std::map<NameT,UId>::const_iterator I=CompsLookupTable.begin(),
J=CompsLookupTable.end(); I!=J; ++I)
std::map<NameT,UId>::const_iterator I,J;
for(I=CompsLookupTable.begin(), J=CompsLookupTable.end(); I!=J; ++I)
{
if(I->second == id)
return I->first;
break;
}
RDK_THROW(EComponentIdNotExist(id));
if(I ==J)
RDK_THROW(EComponentIdNotExist(id));
return I->first;
}
// Id
......@@ -732,13 +736,17 @@ const UId& UContainer::GetComponentId(const NameT &name, bool nothrow) const
// Id
const NameT& UContainer::GetPointerName(const UId &id) const
{
for(PointerMapCIteratorT I=PointerLookupTable.begin(),
J=PointerLookupTable.end(); I!=J; ++I)
PointerMapCIteratorT I,J;
for(I=PointerLookupTable.begin(), J=PointerLookupTable.end(); I!=J; ++I)
{
if(I->second.Id == id)
return I->first;
break;
}
RDK_THROW(EPointerIdNotExist(id));
if(I == J)
RDK_THROW(EPointerIdNotExist(id));
return I->first;
}
// Id
......@@ -1141,9 +1149,9 @@ UEPtr<UContainer> UContainer::GetComponent(const UId &id, bool nothrow) const
if(id == (*comps)->Id)
return *comps;
if(nothrow)
return 0;
RDK_THROW(EComponentIdNotExist(id));
if(!nothrow)
RDK_THROW(EComponentIdNotExist(id));
return 0;
}
// ,
......
......@@ -5903,9 +5903,9 @@ UBHistogram operator - (const UBHistogram &value1, const UBHistogram &value2)
else
{
res.Data[i].Int=abs(int(value1.Data[i].Int-value2.Data[i].Int));
if(res.Data[i].Int<int(h_min))
if(res.Data[i].Int<unsigned(h_min))
h_min=float(res.Data[i].Int);
if(res.Data[i].Int>int(h_max))
if(res.Data[i].Int>unsigned(h_max))
h_max=float(res.Data[i].Int);
}
}
......
......@@ -149,6 +149,8 @@ int GetRows(void) const;
//
T& operator [] (int i);
const T& operator [] (int i) const;
T& operator [] (size_t i);
const T& operator [] (size_t i) const;
T& operator () (int i, int j);
const T& operator () (int i, int j) const;
......@@ -745,6 +747,18 @@ const T& MDMatrix<T>::operator [] (int i) const
return Data[i];
}
template<class T>
T& MDMatrix<T>::operator [] (size_t i)
{
return Data[i];
}
template<class T>
const T& MDMatrix<T>::operator [] (size_t i) const
{
return Data[i];
}
template<class T>
T& MDMatrix<T>::operator () (int i, int j)
{
......
......@@ -8,11 +8,15 @@
#define RDK_CALL
#else
#ifdef QT_VERSION
#define RDK_LIB_TYPE
#define RDK_CALL
#ifndef RDK_LIB_TYPE
#define RDK_LIB_TYPE
#define RDK_CALL
#endif
#else
#define RDK_LIB_TYPE
#define RDK_CALL
#ifndef RDK_LIB_TYPE
#define RDK_LIB_TYPE
#define RDK_CALL
#endif
#endif
#endif
......
......@@ -32,7 +32,7 @@ static size_t my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream)
static
size_t write_response(void *ptr, size_t size, size_t nmemb, void *data)
{
FILE *writehere = (FILE *)data;
// FILE *writehere = (FILE *)data;
char* str = static_cast<char*>(ptr);
//std::string s(str);
qDebug()<<str;
......@@ -96,7 +96,7 @@ void UCurlFtpClientTestWidget::onPushButtonSendFileClick()
}
FILE *hd_src;
struct stat file_info;
// struct stat file_info;
struct curl_slist *headerlist = NULL;
// - .
......
......@@ -90,10 +90,10 @@ void UGraphWidget::addDataToGraph(size_t id, std::vector<double> X1, std::vecto
//
for (size_t j=startSizeElem; j<startSizeElem+addSizeElem-1; j++)
{
masX[id][j]=X1[j-startSizeElem];
masY[id][j]=Y1[j-startSizeElem];
masX[id][int(j)]=X1[j-startSizeElem];
masY[id][int(j)]=Y1[j-startSizeElem];
}
emit transferDataSignal(id, masX[id], masY[id]);
emit transferDataSignal(int(id), masX[id], masY[id]);
}
void UGraphWidget::addDataToGraph(size_t id, double X1, double Y1)
......@@ -110,7 +110,7 @@ void UGraphWidget::addDataToGraph(size_t id, double X1, double Y1)
masX[id].push_back(X1);
masY[id].push_back(Y1);
emit transferDataSignal(id, masX[id], masY[id]);
emit transferDataSignal(int(id), masX[id], masY[id]);
}
void UGraphWidget::mainGraphSettings(double leftLimit, double rightLimit, double lowerLimit, double upperLimit, const QString &nameX, const QString &nameY)
......
......@@ -118,7 +118,7 @@ void UTcpServerControlWidget::AUpdateInterface()
if(application->GetServerControl()->GetServerTransport().Get()!=nullptr)
{
bool state = application->GetServerControl()->GetServerTransport()->GetSocketState(bnd);
// bool state = application->GetServerControl()->GetServerTransport()->GetSocketState(bnd);
if(!application->GetServerControl()->GetServerTransport()->ServerIsActive())
{
ui->labelServerState->setText("Server is disabled");
......
......@@ -14,7 +14,14 @@ DEFINES += LIBRDK_LIBRARY_EXPORT
DEFINES += RDK_UNICODE_RUN
DEFINES += RDK_QT
DEFINES += CURL_STATICLIB
windows {
DEFINES += _MBCS
DEFINES -= _MBCS
DEFINES -= _UNICODE
DEFINES -= UNICODE
INCLUDEPATH += $$PWD/../../include
}
unix {
DESTDIR = $$PWD/../../../../../Bin/Platform/Unix/Lib.Qt
......
......@@ -390,7 +390,7 @@ static CURLcode file_upload(struct connectdata *conn)
buf2 = buf;
/* write the data to the target */
nwrite = write(fd, buf2, nread);
nwrite = write(fd, buf2, (unsigned int)nread);
if(nwrite != nread) {
res = CURLE_SEND_ERROR;
break;
......@@ -560,7 +560,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
(expected_size < CURL_OFF_T_C(BUFSIZE) - CURL_OFF_T_C(1)) ?
curlx_sotouz(expected_size) : BUFSIZE - 1;
nread = read(fd, buf, bytestoread);
nread = read(fd, buf, (unsigned int)bytestoread);
if(nread > 0)
buf[nread] = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment