mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-28 21:01:04 +00:00
[Refs #87: Static Analysis] Couple of cases that confused the analyser
This commit is contained in:
@@ -103,8 +103,10 @@ bool WrappedOpenGL::Serialise_glShaderSource(GLuint shader, GLsizei count, const
|
||||
|
||||
if(m_State == READING)
|
||||
{
|
||||
const char **strings = new const char*[srcs.size()];
|
||||
for(size_t i=0; i < srcs.size(); i++)
|
||||
size_t numStrings = srcs.size();
|
||||
|
||||
const char **strings = new const char*[numStrings];
|
||||
for(size_t i=0; i < numStrings; i++)
|
||||
strings[i] = srcs[i].c_str();
|
||||
|
||||
ResourceId liveId = GetResourceManager()->GetLiveID(id);
|
||||
|
||||
@@ -93,6 +93,7 @@ private:
|
||||
|
||||
static HRESULT WINAPI CreateDXGIFactory_hook(__in REFIID riid, __out void **ppFactory)
|
||||
{
|
||||
if(ppFactory) *ppFactory = NULL;
|
||||
HRESULT ret = dxgihooks.CreateDXGIFactory()(riid, ppFactory);
|
||||
|
||||
if(SUCCEEDED(ret) && dxgihooks.m_EnabledHooks)
|
||||
@@ -103,6 +104,7 @@ private:
|
||||
|
||||
static HRESULT WINAPI CreateDXGIFactory1_hook(__in REFIID riid, __out void **ppFactory)
|
||||
{
|
||||
if(ppFactory) *ppFactory = NULL;
|
||||
HRESULT ret = dxgihooks.CreateDXGIFactory1()(riid, ppFactory);
|
||||
|
||||
if(SUCCEEDED(ret) && dxgihooks.m_EnabledHooks)
|
||||
|
||||
@@ -112,6 +112,10 @@ class SysHook : LibraryHook
|
||||
{
|
||||
lpProcessInformation = &dummy;
|
||||
}
|
||||
else
|
||||
{
|
||||
*lpProcessInformation = dummy;
|
||||
}
|
||||
|
||||
dwCreationFlags |= CREATE_SUSPENDED;
|
||||
|
||||
@@ -164,6 +168,10 @@ class SysHook : LibraryHook
|
||||
{
|
||||
lpProcessInformation = &dummy;
|
||||
}
|
||||
else
|
||||
{
|
||||
*lpProcessInformation = dummy;
|
||||
}
|
||||
|
||||
dwCreationFlags |= CREATE_SUSPENDED;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user