tgsi: avoid returning pointer to local var, make it static
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 21 Feb 2015 17:44:05 +0000 (12:44 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 21 Feb 2015 22:27:24 +0000 (17:27 -0500)
Spotted by Coverity.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/tgsi/tgsi_exec.c

index a8fc0089f5ab0c084e88c4068e2954af4fed31da..8d08059deca4ce37a4e643cff2675228f47632a1 100644 (file)
@@ -1515,7 +1515,7 @@ store_dest_dstret(struct tgsi_exec_machine *mach,
                  enum tgsi_exec_datatype dst_datatype)
 {
    uint i;
-   union tgsi_exec_channel null;
+   static union tgsi_exec_channel null;
    union tgsi_exec_channel *dst;
    union tgsi_exec_channel index2D;
    uint execmask = mach->ExecMask;