mesa: Fix _mesa_lookup_parameter_constant's return value.
Fixes gcc warning In function ‘_mesa_add_unnamed_constant’: warning: ‘pos’ may be used uninitialized in this function but also what appears to be a bug.
This commit is contained in:
parent
e4c3e7f9d8
commit
128237927d
|
@ -482,8 +482,10 @@ _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *list,
|
|||
assert(vSize >= 1);
|
||||
assert(vSize <= 4);
|
||||
|
||||
if (!list)
|
||||
return -1;
|
||||
if (!list) {
|
||||
*posOut = -1;
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
for (i = 0; i < list->NumParameters; i++) {
|
||||
if (list->Parameters[i].Type == PROGRAM_CONSTANT) {
|
||||
|
|
Loading…
Reference in New Issue