Silence more warnings

This commit is contained in:
twinaphex 2020-06-29 20:17:54 +02:00
parent 55d9456cbb
commit cf1eb2e989
1 changed files with 6 additions and 3 deletions

View File

@ -225,7 +225,8 @@ static bool slang_process_reflection(
uniform.offset = 0; uniform.offset = 0;
uniform.id[0] = '\0'; uniform.id[0] = '\0';
strlcpy(uniform.id, uniform_id, sizeof(uniform.id)); if (!string_is_empty(uniform_id))
strlcpy(uniform.id, uniform_id, sizeof(uniform.id));
if (src.push_constant) if (src.push_constant)
{ {
@ -528,8 +529,10 @@ bool slang_process(
break; break;
} }
vs_resources = vs_compiler->get_shader_resources(); if (vs_compiler)
ps_resources = ps_compiler->get_shader_resources(); vs_resources = vs_compiler->get_shader_resources();
if (ps_compiler)
ps_resources = ps_compiler->get_shader_resources();
if (!vs_resources.uniform_buffers.empty()) if (!vs_resources.uniform_buffers.empty())
vs_compiler->set_decoration( vs_compiler->set_decoration(