Mesa (mesa_7_6_branch): glu/sgi: Silence uninitialized variable warnings.

Vinson Lee vlee at kemper.freedesktop.org
Tue Dec 22 23:07:42 PST 2009


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

Author: Vinson Lee <vlee at vmware.com>
Date:   Tue Dec 22 23:07:00 2009 -0800

glu/sgi: Silence uninitialized variable warnings.

---

 src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc |    4 ++--
 src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc b/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc
index e12f88b..2e70f83 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc
@@ -207,7 +207,7 @@ void sampleBotRightWithGridLine(Real* botVertex,
     return;
   }
 
-  Int segIndexMono, segIndexPass;
+  Int segIndexMono = 0, segIndexPass;
   findBotRightSegment(rightChain,
 		      rightEnd,
 		      rightCorner,
@@ -293,7 +293,7 @@ void sampleBotLeftWithGridLine(Real* botVertex,
     return;
   }
 
-  Int segIndexPass, segIndexMono;
+  Int segIndexPass, segIndexMono = 0;
   findBotLeftSegment(leftChain, leftEnd, leftCorner, grid->get_u_value(leftU), segIndexMono, segIndexPass);
 
   sampleBotLeftWithGridLinePost(botVertex,
diff --git a/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc b/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc
index b7b9296..951e937 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc
@@ -172,7 +172,7 @@ void sampleTopRightWithGridLine(Real* topVertex,
     return;
   }
 
-  Int segIndexSmall, segIndexLarge;
+  Int segIndexSmall = 0, segIndexLarge;
   findTopRightSegment(rightChain,
                       rightStart,
                       rightEnd,
@@ -294,7 +294,7 @@ void sampleTopLeftWithGridLine(Real* topVertex,
                                 primStream* pStream
                                 )
 {
-  Int segIndexSmall, segIndexLarge;
+  Int segIndexSmall = 0, segIndexLarge;
   //if left chain is empty, then there is only one top vertex with one grid 
   //  line
   if(leftEnd < leftStart) {



More information about the mesa-commit mailing list