Mesa (mesa_7_7_branch): st/vega: Silence compiler warnings.

Vinson Lee vlee at kemper.freedesktop.org
Sun Dec 27 22:40:07 PST 2009


Module: Mesa
Branch: mesa_7_7_branch
Commit: bf63b9d7a942bfbeef0b2b765bfc346c93de6fb7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bf63b9d7a942bfbeef0b2b765bfc346c93de6fb7

Author: Vinson Lee <vlee at vmware.com>
Date:   Sun Dec 27 22:39:31 2009 -0800

st/vega: Silence compiler warnings.

---

 src/gallium/state_trackers/vega/api_path.c   |    3 +--
 src/gallium/state_trackers/vega/arc.c        |    2 --
 src/gallium/state_trackers/vega/bezier.c     |    2 --
 src/gallium/state_trackers/vega/stroker.c    |    4 ++--
 src/gallium/state_trackers/vega/vg_context.c |    3 ---
 src/gallium/state_trackers/vega/vg_tracker.c |    1 +
 6 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/src/gallium/state_trackers/vega/api_path.c b/src/gallium/state_trackers/vega/api_path.c
index a6b7a2b..15ac190 100644
--- a/src/gallium/state_trackers/vega/api_path.c
+++ b/src/gallium/state_trackers/vega/api_path.c
@@ -164,8 +164,7 @@ void vgAppendPathData(VGPath dstPath,
       return;
    }
    for (i = 0; i < numSegments; ++i) {
-      if (pathSegments[i] < VG_CLOSE_PATH ||
-          pathSegments[i] > VG_LCWARC_TO_REL) {
+      if (pathSegments[i] > VG_LCWARC_TO_REL) {
          vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
          return;
       }
diff --git a/src/gallium/state_trackers/vega/arc.c b/src/gallium/state_trackers/vega/arc.c
index db26e01..2d12340 100644
--- a/src/gallium/state_trackers/vega/arc.c
+++ b/src/gallium/state_trackers/vega/arc.c
@@ -528,7 +528,6 @@ static INLINE int num_beziers_needed(struct arc *arc)
    double threshold = 0.05;
    VGboolean found = VG_FALSE;
    int n = 1;
-   int i;
    double min_eta, max_eta;
 
    min_eta = MIN2(arc->eta1, arc->eta2);
@@ -562,7 +561,6 @@ static void arc_to_beziers(struct arc *arc,
       sin_eta_b, a_cos_eta_b, b_sin_eta_b, a_sin_eta_b,
       b_cos_eta_b, x_b, y_b, x_b_dot, y_b_dot, lx, ly;
    double t, alpha;
-   int i;
 
    { /* always move to the start of the arc */
       VGfloat x = arc->x1;
diff --git a/src/gallium/state_trackers/vega/bezier.c b/src/gallium/state_trackers/vega/bezier.c
index 5fc17fb..5769e8e 100644
--- a/src/gallium/state_trackers/vega/bezier.c
+++ b/src/gallium/state_trackers/vega/bezier.c
@@ -343,8 +343,6 @@ static enum shift_result shift(const struct bezier *orig,
    float points_shifted[4][2];
    float prev_normal[2];
 
-   int i;
-
    points[np][0] = orig->x1;
    points[np][1] = orig->y1;
    map[0] = 0;
diff --git a/src/gallium/state_trackers/vega/stroker.c b/src/gallium/state_trackers/vega/stroker.c
index 1b92d2b..68a5202 100644
--- a/src/gallium/state_trackers/vega/stroker.c
+++ b/src/gallium/state_trackers/vega/stroker.c
@@ -476,7 +476,7 @@ static enum intersection_type line_intersect(const VGfloat *l1,
                                              const VGfloat *l2,
                                              float *intersection_point)
 {
-   VGfloat isect[2];
+   VGfloat isect[2] = { 0 };
    enum intersection_type type;
    VGboolean dx_zero, ldx_zero;
 
@@ -649,7 +649,7 @@ static void create_joins(struct stroker *stroker,
       VGfloat prev_line[] = {stroker->back2_x, stroker->back2_y,
                              stroker->back1_x, stroker->back1_y};
 
-      VGfloat isect[2];
+      VGfloat isect[2] = { 0 };
       enum intersection_type type = line_intersect(prev_line, next_line, isect);
 
       if (join == SquareJoin) {
diff --git a/src/gallium/state_trackers/vega/vg_context.c b/src/gallium/state_trackers/vega/vg_context.c
index 571e6b6..00d23f5 100644
--- a/src/gallium/state_trackers/vega/vg_context.c
+++ b/src/gallium/state_trackers/vega/vg_context.c
@@ -232,10 +232,7 @@ static void update_clip_state(struct vg_context *ctx)
       struct pipe_blend_state *blend = &ctx->state.g3d.blend;
       struct pipe_framebuffer_state *fb = &ctx->state.g3d.fb;
       int i;
-<<<<<<< HEAD:src/gallium/state_trackers/vega/vg_context.c
 
-=======
->>>>>>> mesa_7_6_branch:src/gallium/state_trackers/vega/vg_context.c
       dsa->depth.writemask = 1;/*glDepthMask(TRUE);*/
       dsa->depth.func = PIPE_FUNC_ALWAYS;
       dsa->depth.enabled = 1;
diff --git a/src/gallium/state_trackers/vega/vg_tracker.c b/src/gallium/state_trackers/vega/vg_tracker.c
index c4da01e..a8ab939 100644
--- a/src/gallium/state_trackers/vega/vg_tracker.c
+++ b/src/gallium/state_trackers/vega/vg_tracker.c
@@ -33,6 +33,7 @@
 #include "pipe/p_screen.h"
 #include "util/u_memory.h"
 #include "util/u_math.h"
+#include "util/u_rect.h"
 
 static struct pipe_texture *
 create_texture(struct pipe_context *pipe, enum pipe_format format,



More information about the mesa-commit mailing list