Remove compilation warning
authorHyunbin Lee <hyunbin.lee@samsung.com>
Wed, 17 Jul 2013 05:30:15 +0000 (14:30 +0900)
committerHyunbin Lee <hyunbin.lee@samsung.com>
Wed, 17 Jul 2013 05:35:51 +0000 (14:35 +0900)
Change-Id: Ic5b5974d1d2347aab649aa661bd267e768a5d3ea
Signed-off-by: Hyunbin Lee <hyunbin.lee@samsung.com>
src/app/FApp_SqlDataControlImpl.cpp
src/io/FIo_DataSetImpl.cpp
src/io/FIo_FileUtil.cpp
src/io/FIo_IpcClient.cpp
src/io/FIo_MessagePortProxy.cpp
src/io/FIo_RegistryCore.cpp
src/io/inc/FIo_DataSetImpl.h
src/server/io/FIo_IpcServer.cpp

index 193087b..4c95acd 100644 (file)
@@ -560,7 +560,6 @@ _SqlDataControlImpl::Insert(const String& dataId, const IMap& insertMap, Request
 
        int columnCount = 0;
        int id = 0;
-       int i = 0;
        int uniqueId = -1;
        File request;
        IMapEnumerator* pMapEnum = null;
@@ -699,7 +698,6 @@ _SqlDataControlImpl::Update(const String& dataId, const IMap& updateMap, const S
 
        int columnCount = 0;
        int id = 0;
-       int i = 0;
        int uniqueId = -1;
        File request;
        IMapEnumerator* pMapEnum = null;
index 735728e..012d78f 100644 (file)
@@ -36,10 +36,11 @@ using namespace Tizen::Base::Collection;
 namespace Tizen { namespace Io
 {
 _DataSetImpl::_DataSetImpl(void)
-       :__rowCount(0),
-       __pDataSet(null),
-       __pColumnList(null),
-       __pColumnTypeList(null)
+       : __columnCount(0)
+       , __rowCount(0)
+       , __pDataSet(null)
+       , __pColumnList(null)
+       , __pColumnTypeList(null)
 {
 }
 
index 2f00b57..385aa2f 100644 (file)
@@ -331,10 +331,11 @@ _FileUtil::GetAttributes(const String& filePath, FileAttributes& attribute)
                           GetErrorMessage(GetLastResult()));
 
        struct stat64 statbuf;
-       if (int ret = stat64(pFilePath.get(), &statbuf) == -1)
+       if (stat64(pFilePath.get(), &statbuf) == -1)
        {
                r = __ConvertNativeErrorToResult(errno);
-               SysSecureLogException(NID_IO, r, "[%s] Failed to get file (%s) status.", GetErrorMessage(r), pFilePath.get());
+               SysSecureLogException(NID_IO, r, "[%s] Failed to get file (%s) status. errno: %d (%s)",
+                               GetErrorMessage(r), pFilePath.get(), errno, strerror(errno));
                return r;
        }
 
index 70a77be..3874bcd 100644 (file)
@@ -279,7 +279,7 @@ _IpcClient::MakeConnection(bool forReverse)
        SysTryCatch(NID_IO, ret >= 0 , r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Failed to set file status flags (%d, %s).",
                                           errno, strerror(errno));
 
-       write(client, &helloMessage, sizeof(helloMessage));
+       ret = write(client, &helloMessage, sizeof(helloMessage));
 
        if (forReverse)
        {
index 244cf39..9065bd5 100644 (file)
@@ -231,7 +231,6 @@ _MessagePortProxy::RegisterMessagePort(const String& localPort,     bool isTrusted,
 {
        SysSecureLog(NID_IO, "Register a message port : [%ls:%ls]", __appId.GetPointer(), localPort.GetPointer());
 
-       result r = E_SUCCESS;
        int ret = 0;
        bool contain = false;
 
index 2c916bb..5d2b816 100644 (file)
@@ -1035,7 +1035,7 @@ _RegistryCore::PrepareToWrite(void)
        if (_sectionList.GetCount() == 0)
        {
                unique_ptr<char[]> pFilePath(_StringConverter::CopyToCharArrayN(_regPath));
-               truncate(pFilePath.get(), 0);
+               int res = truncate(pFilePath.get(), 0);
 
                return E_SUCCESS;
        }
index 18ee82c..e7b661e 100755 (executable)
@@ -66,13 +66,12 @@ private:
 
        _DataSetImpl& operator =(const _DataSetImpl& dataSetImpl);
 
+private:
+       int __columnCount;
+       int __rowCount;
        Tizen::Base::Collection::LinkedList* __pDataSet;
        Tizen::Base::Collection::ArrayList* __pColumnList;
        Tizen::Base::Collection::ArrayList* __pColumnTypeList;
-
-       int __columnCount;
-       int __rowCount;
-
        Tizen::Base::Collection::LinkedList __enumImplList;
        Tizen::Base::Collection::LinkedList __rowImplList;
 }; // _DataSetImpl
index 671078a..47f1e7d 100644 (file)
@@ -290,6 +290,7 @@ _IpcServer::OnConnectionRequest(GIOChannel* source, GIOCondition condition, gpoi
        _ChannelInfo* pChannelInfo = null;
        GSource* pGSource = null;
        GIOChannel* pChannel = null;
+       ssize_t res = 0;
 
        int server = -1;
        int client = -1;
@@ -304,7 +305,7 @@ _IpcServer::OnConnectionRequest(GIOChannel* source, GIOCondition condition, gpoi
        client = accept(server, (struct sockaddr*) &clientAddress, &clientLen);
        SysTryCatch(NID_IO, client != -1, , E_SYSTEM, "[E_SYSTEM] Accept failed.");
 
-       read(client, &helloMessage, sizeof(helloMessage));
+       res = read(client, &helloMessage, sizeof(helloMessage));
        helloMessage.appId[255] = '\0';
 
        pChannel = g_io_channel_unix_new(client);