Assertions are not sufficient to check for null pointers as they don't
show up in release builds. So, return ZeroVec/dummyReg instead of NULL
pointer in get_{src,dst}_register_pointer(). This should calm down the
warnings from static analysis tool.
Note: This is a candidate for the 9.1 branch.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
_mesa_problem(NULL,
"Invalid src register file %d in get_src_register_pointer()",
source->File);
- return NULL;
+ return ZeroVec;
}
}
_mesa_problem(NULL,
"Invalid dest register file %d in get_dst_register_pointer()",
dest->File);
- return NULL;
+ return dummyReg;
}
}
const struct gl_program_machine *machine, GLfloat result[4])
{
const GLfloat *src = get_src_register_pointer(source, machine);
- ASSERT(src);
if (source->Swizzle == SWIZZLE_NOOP) {
/* no swizzling */
const struct gl_program_machine *machine, GLfloat result[4])
{
const GLfloat *src = get_src_register_pointer(source, machine);
- ASSERT(src);
result[0] = src[GET_SWZ(source->Swizzle, 0)];