check return value instead of errno sync
authorVolker Birk <vb@pep.foundation>
Sun, 21 Oct 2018 11:42:19 +0200
branchsync
changeset 307302fe4d2cdc6f
parent 3062 4ab13f23726f
child 3074 680162c4b35e
check return value instead of errno
build-windows/pEpEngine.vcxproj
src/platform_windows.cpp
     1.1 --- a/build-windows/pEpEngine.vcxproj	Tue Oct 16 06:39:13 2018 +0200
     1.2 +++ b/build-windows/pEpEngine.vcxproj	Sun Oct 21 11:42:19 2018 +0200
     1.3 @@ -45,11 +45,20 @@
     1.4      <RunCodeAnalysis>false</RunCodeAnalysis>
     1.5      <IncludePath>$(ProjectDir)\..\..\libetpan\build-windows\include;C:\Program Files %28x86%29\GnuPG\include;$(IncludePath);$(ProjectDir)\asn.1;%ASN1C%\share\asn1c</IncludePath>
     1.6      <LibraryPath>$(ProjectDir)\..\..\libetpan\build-windows\Debug;$(LibraryPath)</LibraryPath>
     1.7 +    <PreBuildEventUseInBuild>true</PreBuildEventUseInBuild>
     1.8 +    <PreLinkEventUseInBuild>true</PreLinkEventUseInBuild>
     1.9 +    <PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
    1.10 +    <CodeAnalysisRuleSet>C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\Rule Sets\NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
    1.11    </PropertyGroup>
    1.12    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    1.13      <LinkIncremental>false</LinkIncremental>
    1.14      <IncludePath>$(ProjectDir)\..\..\libetpan\build-windows\include;C:\Program Files %28x86%29\GnuPG\include;$(IncludePath);$(ProjectDir)\asn.1;%ASN1C%\share\asn1c</IncludePath>
    1.15      <LibraryPath>$(ProjectDir)\..\..\libetpan\build-windows\Release;$(LibraryPath)</LibraryPath>
    1.16 +    <PreBuildEventUseInBuild>true</PreBuildEventUseInBuild>
    1.17 +    <PreLinkEventUseInBuild>true</PreLinkEventUseInBuild>
    1.18 +    <PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
    1.19 +    <CodeAnalysisRuleSet>C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\Rule Sets\NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
    1.20 +    <RunCodeAnalysis>false</RunCodeAnalysis>
    1.21    </PropertyGroup>
    1.22    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    1.23      <ClCompile>
    1.24 @@ -66,6 +75,7 @@
    1.25        <SubSystem>Windows</SubSystem>
    1.26        <GenerateDebugInformation>true</GenerateDebugInformation>
    1.27        <AdditionalDependencies>Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
    1.28 +      <ShowProgress>NotSet</ShowProgress>
    1.29      </Link>
    1.30      <PreBuildEvent>
    1.31        <Command>
    1.32 @@ -88,6 +98,7 @@
    1.33        <CompileAs>Default</CompileAs>
    1.34        <MultiProcessorCompilation>true</MultiProcessorCompilation>
    1.35        <ControlFlowGuard>Guard</ControlFlowGuard>
    1.36 +      <EnablePREfast>false</EnablePREfast>
    1.37      </ClCompile>
    1.38      <Link>
    1.39        <SubSystem>Windows</SubSystem>
     2.1 --- a/src/platform_windows.cpp	Tue Oct 16 06:39:13 2018 +0200
     2.2 +++ b/src/platform_windows.cpp	Sun Oct 21 11:42:19 2018 +0200
     2.3 @@ -287,7 +287,7 @@
     2.4  int mkstemp(char *templ)
     2.5  {
     2.6      char *pathname = _mktemp(templ);
     2.7 -    if (errno)
     2.8 +    if (!pathname)
     2.9          return -1;
    2.10      return _open(pathname, _O_RDWR | _O_CREAT | _O_EXCL, _S_IREAD | _S_IWRITE);
    2.11  }