Skip to content

Commit

Permalink
Cleaned up /analyze warnings with VS 2015 Update 2
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Mar 17, 2016
1 parent 956d6ad commit 7b87687
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*.tlog
*.lastbuildstate
*.ilk
*.VC.db
Bin
/Src/Shaders/Compiled/XboxOne*.inc
/ipch
Expand Down
2 changes: 2 additions & 0 deletions Src/DGSLEffectFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ void DGSLEffectFactory::Impl::CreatePixelShader( const WCHAR* name, ID3D11PixelS
ThrowIfFailed(
device->CreatePixelShader( data.get(), dataSize, nullptr, pixelShader ) );

_Analysis_assume_(*pixelShader != 0);

if ( mSharing && *name && it == mShaderCache.end() )
{
std::lock_guard<std::mutex> lock(mutex);
Expand Down
4 changes: 4 additions & 0 deletions Src/GeometricPrimitive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ namespace
device->CreateBuffer(&bufferDesc, &dataDesc, pBuffer)
);

_Analysis_assume_(*pBuffer != 0);

SetDebugObjectName(*pBuffer, "DirectXTK:GeometricPrimitive");
}

Expand All @@ -121,6 +123,8 @@ namespace
pInputLayout)
);

_Analysis_assume_(*pInputLayout != 0);

SetDebugObjectName(*pInputLayout, "DirectXTK:GeometricPrimitive");
}
}
Expand Down
2 changes: 2 additions & 0 deletions Src/Model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ void ModelMeshPart::CreateInputLayout( ID3D11Device* d3dDevice, IEffect* ieffect
shaderByteCode, byteCodeLength,
iinputLayout )
);

_Analysis_assume_(*iinputLayout != 0);
}


Expand Down
2 changes: 2 additions & 0 deletions Src/ModelLoadCMO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ static void CreateInputLayout(_In_ ID3D11Device* device, IEffect* effect, _Out_
);
}

_Analysis_assume_(*pInputLayout != 0);

SetDebugObjectName(*pInputLayout, "ModelCMO");
}

Expand Down
2 changes: 2 additions & 0 deletions Src/ModelLoadSDKMESH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,8 @@ static void CreateInputLayout(_In_ ID3D11Device* device, _In_ IEffect* effect, s
pInputLayout)
);

_Analysis_assume_(*pInputLayout != 0);

SetDebugObjectName(*pInputLayout, "ModelSDKMESH");
}

Expand Down
2 changes: 2 additions & 0 deletions Src/PrimitiveBatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ static void CreateBuffer(_In_ ID3D11Device* device, size_t bufferSize, D3D11_BIN
device->CreateBuffer(&desc, nullptr, pBuffer)
);

_Analysis_assume_(*pBuffer != 0);

SetDebugObjectName(*pBuffer, "DirectXTK:PrimitiveBatch");
}
#endif
Expand Down

0 comments on commit 7b87687

Please sign in to comment.