mesa: init dst values in COPY_CLEAN_4V_TYPE_AS_FLOAT()
authorBrian Paul <brianp@vmware.com>
Fri, 23 Aug 2013 21:32:28 +0000 (15:32 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 26 Aug 2013 18:52:06 +0000 (12:52 -0600)
to silence gcc 4.8.1 warnings.  And improve the ASSERT(0) call.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/main/macros.h

index ddfeee226227e0ab28da6f50f6c0fef70b92f40a..1052f756074b10bc7274e5c3fa115d7e2b530efb 100644 (file)
@@ -607,7 +607,8 @@ COPY_CLEAN_4V_TYPE_AS_FLOAT(GLfloat dst[4], int sz, const GLfloat src[4],
                      UINT_AS_FLT(0), UINT_AS_FLT(1));
       break;
    default:
-      ASSERT(0);
+      ASSIGN_4V(dst, 0.0f, 0.0f, 0.0f, 1.0f); /* silence warnings */
+      ASSERT(!"Unexpected type in COPY_CLEAN_4V_TYPE_AS_FLOAT macro");
    }
    COPY_SZ_4V(dst, sz, src);
 }