mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-06 21:56:23 +01:00
chore(Net): fix some warnings and tests
This commit is contained in:
@@ -99,7 +99,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||||
@@ -109,12 +109,12 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
@@ -190,27 +190,33 @@
|
|||||||
<OutDir>..\bin64\</OutDir>
|
<OutDir>..\bin64\</OutDir>
|
||||||
<IntDir>obj64\Net\$(Configuration)\</IntDir>
|
<IntDir>obj64\Net\$(Configuration)\</IntDir>
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<TargetName>Poco$(ProjectName)64d</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||||
<OutDir>..\bin64\</OutDir>
|
<OutDir>..\bin64\</OutDir>
|
||||||
<IntDir>obj64\Net\$(Configuration)\</IntDir>
|
<IntDir>obj64\Net\$(Configuration)\</IntDir>
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<TargetName>Poco$(ProjectName)64</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||||
<OutDir>..\lib64\</OutDir>
|
<OutDir>..\lib64\</OutDir>
|
||||||
<IntDir>obj64\Net\$(Configuration)\</IntDir>
|
<IntDir>obj64\Net\$(Configuration)\</IntDir>
|
||||||
|
<TargetName>Poco$(ProjectName)64d</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||||
<OutDir>..\lib64\</OutDir>
|
<OutDir>..\lib64\</OutDir>
|
||||||
<IntDir>obj64\Net\$(Configuration)\</IntDir>
|
<IntDir>obj64\Net\$(Configuration)\</IntDir>
|
||||||
|
<TargetName>Poco$(ProjectName)64</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||||
<OutDir>..\lib64\</OutDir>
|
<OutDir>..\lib64\</OutDir>
|
||||||
<IntDir>obj64\Net\$(Configuration)\</IntDir>
|
<IntDir>obj64\Net\$(Configuration)\</IntDir>
|
||||||
|
<TargetName>Poco$(ProjectName)64d</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||||
<OutDir>..\lib64\</OutDir>
|
<OutDir>..\lib64\</OutDir>
|
||||||
<IntDir>obj64\Net\$(Configuration)\</IntDir>
|
<IntDir>obj64\Net\$(Configuration)\</IntDir>
|
||||||
|
<TargetName>Poco$(ProjectName)64</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ int Socket::select(SocketList& readList, SocketList& writeList, SocketList& exce
|
|||||||
{
|
{
|
||||||
#if defined(POCO_HAVE_FD_EPOLL)
|
#if defined(POCO_HAVE_FD_EPOLL)
|
||||||
|
|
||||||
int epollSize = readList.size() + writeList.size() + exceptList.size();
|
int epollSize = static_cast<int>(readList.size() + writeList.size() + exceptList.size());
|
||||||
if (epollSize == 0) return 0;
|
if (epollSize == 0) return 0;
|
||||||
|
|
||||||
PollSet ps;
|
PollSet ps;
|
||||||
@@ -119,7 +119,7 @@ int Socket::select(SocketList& readList, SocketList& writeList, SocketList& exce
|
|||||||
if (s.second & PollSet::POLL_ERROR) exceptList.push_back(s.first);
|
if (s.second & PollSet::POLL_ERROR) exceptList.push_back(s.first);
|
||||||
}
|
}
|
||||||
|
|
||||||
return readList.size() + writeList.size() + exceptList.size();
|
return static_cast<int>(readList.size() + writeList.size() + exceptList.size());
|
||||||
|
|
||||||
#elif defined(POCO_HAVE_FD_POLL)
|
#elif defined(POCO_HAVE_FD_POLL)
|
||||||
typedef Poco::SharedPtr<pollfd, Poco::ReferenceCounter, Poco::ReleaseArrayPolicy<pollfd>> SharedPollArray;
|
typedef Poco::SharedPtr<pollfd, Poco::ReferenceCounter, Poco::ReleaseArrayPolicy<pollfd>> SharedPollArray;
|
||||||
|
|||||||
@@ -675,7 +675,7 @@ bool SocketImpl::poll(const Poco::Timespan& timeout, int mode)
|
|||||||
memset(&evout, 0, sizeof(evout));
|
memset(&evout, 0, sizeof(evout));
|
||||||
|
|
||||||
Poco::Timestamp start;
|
Poco::Timestamp start;
|
||||||
rc = epoll_wait(epollfd, &evout, 1, remainingTime.totalMilliseconds());
|
rc = epoll_wait(epollfd, &evout, 1, static_cast<int>(remainingTime.totalMilliseconds()));
|
||||||
if (rc < 0 && lastError() == POCO_EINTR)
|
if (rc < 0 && lastError() == POCO_EINTR)
|
||||||
{
|
{
|
||||||
Poco::Timestamp end;
|
Poco::Timestamp end;
|
||||||
|
|||||||
@@ -109,12 +109,12 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
@@ -194,6 +194,7 @@
|
|||||||
<OutDir>bin64\</OutDir>
|
<OutDir>bin64\</OutDir>
|
||||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<TargetName>$(ProjectName)d</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||||
<OutDir>bin64\</OutDir>
|
<OutDir>bin64\</OutDir>
|
||||||
|
|||||||
@@ -450,9 +450,8 @@ void SocketTest::testSelect()
|
|||||||
assertTrue (writeList.empty());
|
assertTrue (writeList.empty());
|
||||||
assertTrue (exceptList.empty());
|
assertTrue (exceptList.empty());
|
||||||
|
|
||||||
ss.sendBytes("hello", 5);
|
assertTrue (5 == ss.sendBytes("hello", 5));
|
||||||
|
assertTrue (ss.poll(timeout, Socket::SELECT_READ));
|
||||||
ss.poll(timeout, Socket::SELECT_READ);
|
|
||||||
|
|
||||||
readList.push_back(ss);
|
readList.push_back(ss);
|
||||||
writeList.push_back(ss);
|
writeList.push_back(ss);
|
||||||
|
|||||||
Reference in New Issue
Block a user