Mesa (mesa_7_6_branch): gallium/util: Initialize variables in u_pack_color. h.

Vinson Lee vlee at kemper.freedesktop.org
Thu Dec 3 17:57:32 PST 2009


Module: Mesa
Branch: mesa_7_6_branch
Commit: 905e12f3cce7f1bd8cfa990e4d6d7c0b14610f84
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=905e12f3cce7f1bd8cfa990e4d6d7c0b14610f84

Author: Vinson Lee <vlee at vmware.com>
Date:   Fri Nov 20 14:20:15 2009 -0800

gallium/util: Initialize variables in u_pack_color.h.
(cherry picked from commit 36e2074b63e3e5bc489eb74cad0cd97eafcedb40)

---

 src/gallium/auxiliary/util/u_pack_color.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_pack_color.h b/src/gallium/auxiliary/util/u_pack_color.h
index eda883b..9dacc6d 100644
--- a/src/gallium/auxiliary/util/u_pack_color.h
+++ b/src/gallium/auxiliary/util/u_pack_color.h
@@ -302,7 +302,10 @@ util_unpack_color_ub(enum pipe_format format, const void *src,
 static INLINE void
 util_pack_color(const float rgba[4], enum pipe_format format, void *dest)
 {
-   ubyte r, g, b, a;
+   ubyte r = 0;
+   ubyte g = 0;
+   ubyte b = 0;
+   ubyte a = 0;
 
    if (pf_size_x(format) <= 8) {
       /* format uses 8-bit components or less */



More information about the mesa-commit mailing list