From 81dcf8bdf23250dc04dd60994aaede0eb5c2dda7 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 00:33:42 -0800 Subject: t_dd_dmatmp.h: Silence unused value warning in render_line_loop_verts. --- src/mesa/tnl_dd/t_dd_dmatmp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h index e4b535fb68..f5d21b8fdc 100644 --- a/src/mesa/tnl_dd/t_dd_dmatmp.h +++ b/src/mesa/tnl_dd/t_dd_dmatmp.h @@ -241,6 +241,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx, tmp = ALLOC_VERTS(nr+1); tmp = TAG(emit_verts)( ctx, j, nr, tmp ); tmp = TAG(emit_verts)( ctx, start, 1, tmp ); + (void) tmp; } else { TAG(emit_verts)( ctx, j, nr, ALLOC_VERTS(nr) ); -- cgit v1.2.3 From 9e2eee4ab203773fa4b420d3782f0074f5b3bf32 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 01:02:16 -0800 Subject: progs/redbook: Silence compiler warnings in aaindex.c. --- progs/redbook/aaindex.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/progs/redbook/aaindex.c b/progs/redbook/aaindex.c index 7dbc7b4b9b..6011ec44b6 100644 --- a/progs/redbook/aaindex.c +++ b/progs/redbook/aaindex.c @@ -56,7 +56,7 @@ static float rotAngle = 0.; * at RAMP1START, and a blue color ramp starting * at RAMP2START. The ramps must be a multiple of 16. */ -void init(void) +static void init(void) { int i; @@ -76,7 +76,7 @@ void init(void) /* Draw 2 diagonal lines to form an X */ -void display(void) +static void display(void) { glClear(GL_COLOR_BUFFER_BIT); @@ -101,7 +101,7 @@ void display(void) glFlush(); } -void reshape(int w, int h) +static void reshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); @@ -117,7 +117,7 @@ void reshape(int w, int h) } /* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) +static void keyboard(unsigned char key, int x, int y) { switch (key) { case 'r': -- cgit v1.2.3 From 44d6ab6de5d5c02c38146086d3f03523968df49e Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 01:11:56 -0800 Subject: progs/tests: Silence compiler warnings in cva.c. --- progs/tests/cva.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/progs/tests/cva.c b/progs/tests/cva.c index 80483900cb..02d1dcba2e 100644 --- a/progs/tests/cva.c +++ b/progs/tests/cva.c @@ -39,7 +39,7 @@ GLboolean compiled = GL_TRUE; GLboolean doubleBuffer = GL_TRUE; -void init( void ) +static void init( void ) { glClearColor( 0.0, 0.0, 0.0, 0.0 ); glShadeModel( GL_SMOOTH ); @@ -69,7 +69,7 @@ void init( void ) #endif } -void display( void ) +static void display( void ) { glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); @@ -81,7 +81,7 @@ void display( void ) } } -void keyboard( unsigned char key, int x, int y ) +static void keyboard( unsigned char key, int x, int y ) { switch ( key ) { case 27: @@ -92,7 +92,7 @@ void keyboard( unsigned char key, int x, int y ) glutPostRedisplay(); } -GLboolean args( int argc, char **argv ) +static GLboolean args( int argc, char **argv ) { GLint i; -- cgit v1.2.3 From d5be33477e4a5cb73a5ccc24c2ad6518adddeb40 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 01:34:33 -0800 Subject: progs/tests: Silence compiler warnings in vpeval.c. --- progs/tests/vpeval.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/progs/tests/vpeval.c b/progs/tests/vpeval.c index f07737f973..3e8a732df5 100644 --- a/progs/tests/vpeval.c +++ b/progs/tests/vpeval.c @@ -94,16 +94,16 @@ GLfloat colorPoints[4][4][4] = }; -void +static void initlights(void) { +#if 0 /* no lighting for now */ GLfloat ambient[] = {0.2, 0.2, 0.2, 1.0}; GLfloat position[] = {0.0, 0.0, 2.0, 1.0}; GLfloat mat_diffuse[] = {0.6, 0.6, 0.6, 1.0}; GLfloat mat_specular[] = {1.0, 1.0, 1.0, 1.0}; GLfloat mat_shininess[] = {50.0}; -#if 0 /* no lighting for now */ glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); @@ -116,7 +116,7 @@ initlights(void) #endif } -void +static void display(void) { glClearColor(.3, .3, .3, 0); @@ -130,7 +130,7 @@ display(void) glFlush(); } -void +static void myinit(int argc, char *argv[]) { glClearColor(0.0, 0.0, 0.0, 1.0); @@ -186,7 +186,7 @@ myinit(int argc, char *argv[]) } } -void +static void myReshape(int w, int h) { glViewport(0, 0, w, h); -- cgit v1.2.3 From 15c6558a2e6b613a6a058bb7f23b678a32e01846 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 02:06:51 -0800 Subject: progs/xdemos: Silence compiler warnings in glxinfo.c. --- progs/xdemos/glxinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/progs/xdemos/glxinfo.c b/progs/xdemos/glxinfo.c index 23df82f6f9..30cd568064 100644 --- a/progs/xdemos/glxinfo.c +++ b/progs/xdemos/glxinfo.c @@ -116,7 +116,7 @@ print_extension_list(const char *ext) return; width = indent; - printf(indentString); + printf("%s", indentString); i = j = 0; while (1) { if (ext[j] == ' ' || ext[j] == 0) { @@ -126,7 +126,7 @@ print_extension_list(const char *ext) /* start a new line */ printf("\n"); width = indent; - printf(indentString); + printf("%s", indentString); } /* print the extension name between ext[i] and ext[j] */ while (i < j) { -- cgit v1.2.3 From c2cee7741e877bb78480eae8b8b5bfb55b42158c Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 12:52:02 -0800 Subject: t_dd_dmatmp.h: Silence unused value warning in render_line_loop_verts. --- src/mesa/tnl_dd/t_dd_dmatmp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h index f5d21b8fdc..5151949063 100644 --- a/src/mesa/tnl_dd/t_dd_dmatmp.h +++ b/src/mesa/tnl_dd/t_dd_dmatmp.h @@ -255,6 +255,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx, tmp = ALLOC_VERTS(2); tmp = TAG(emit_verts)( ctx, start+1, 1, tmp ); tmp = TAG(emit_verts)( ctx, start, 1, tmp ); + (void) tmp; } FLUSH(); -- cgit v1.2.3 From 7d529736b9a07ddd5d8127c56cc25e5f6f5f2c12 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 13:39:39 -0800 Subject: t_dd_dmatmp.h: Silence unused value warning in render_tri_fan_verts. --- src/mesa/tnl_dd/t_dd_dmatmp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h index 5151949063..3d7e21f745 100644 --- a/src/mesa/tnl_dd/t_dd_dmatmp.h +++ b/src/mesa/tnl_dd/t_dd_dmatmp.h @@ -360,6 +360,7 @@ static void TAG(render_tri_fan_verts)( GLcontext *ctx, tmp = ALLOC_VERTS( nr ); tmp = TAG(emit_verts)( ctx, start, 1, tmp ); tmp = TAG(emit_verts)( ctx, j, nr - 1, tmp ); + (void) tmp; currentsz = dmasz; } -- cgit v1.2.3 From 786899f1532046526bcc94683112d79a5f59a660 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 14:20:17 -0800 Subject: progs/trivial: Silence compiler warnings in tri-blend-max.c --- progs/trivial/tri-blend-max.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/progs/trivial/tri-blend-max.c b/progs/trivial/tri-blend-max.c index b39f8f3f12..b173dab8ec 100644 --- a/progs/trivial/tri-blend-max.c +++ b/progs/trivial/tri-blend-max.c @@ -83,7 +83,7 @@ static void drawRightTriangle(void) glDisable (GL_BLEND); } -void display(void) +static void display(void) { glClear(GL_COLOR_BUFFER_BIT); @@ -99,7 +99,7 @@ void display(void) glFlush(); } -void reshape(int w, int h) +static void reshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); @@ -111,7 +111,7 @@ void reshape(int w, int h) } /* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) +static void keyboard(unsigned char key, int x, int y) { switch (key) { case 't': -- cgit v1.2.3 From c1d361bd0b3570811ca4e49d09d3282aaa5cbe01 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 14:41:35 -0800 Subject: t_dd_dmatmp.h: Silence unused value warning in render_quads_verts. --- src/mesa/tnl_dd/t_dd_dmatmp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h index 3d7e21f745..f363009be4 100644 --- a/src/mesa/tnl_dd/t_dd_dmatmp.h +++ b/src/mesa/tnl_dd/t_dd_dmatmp.h @@ -637,6 +637,7 @@ static void TAG(render_quads_verts)( GLcontext *ctx, /* Send v1, v2, v3 */ tmp = EMIT_VERTS(ctx, j + 1, 3, tmp); + (void) tmp; } } else { -- cgit v1.2.3 From 1e444c9960b18bcee5216a49db997b1c5ec14eca Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 15:08:01 -0800 Subject: swrast: Initialize tex_coords in handle_sample_op. --- src/mesa/swrast/s_atifragshader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/swrast/s_atifragshader.c b/src/mesa/swrast/s_atifragshader.c index 5fefae6c42..e88ff19123 100644 --- a/src/mesa/swrast/s_atifragshader.c +++ b/src/mesa/swrast/s_atifragshader.c @@ -279,7 +279,7 @@ handle_sample_op(GLcontext * ctx, struct atifs_machine *machine, /* sample from unit idx using texinst->src as coords */ GLuint swizzle = texinst->swizzle; GLuint coord_source = texinst->src; - GLfloat tex_coords[4]; + GLfloat tex_coords[4] = { 0 }; if (coord_source >= GL_TEXTURE0_ARB && coord_source <= GL_TEXTURE7_ARB) { coord_source -= GL_TEXTURE0_ARB; -- cgit v1.2.3 From de9132f2740d3959af548e36e9b280e9853e59b6 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 15:27:30 -0800 Subject: t_dd_dmatmp.h: Silence unused value warning in render_poly_verts. --- src/mesa/tnl_dd/t_dd_dmatmp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h index f363009be4..7eadfc6219 100644 --- a/src/mesa/tnl_dd/t_dd_dmatmp.h +++ b/src/mesa/tnl_dd/t_dd_dmatmp.h @@ -400,6 +400,7 @@ static void TAG(render_poly_verts)( GLcontext *ctx, tmp = ALLOC_VERTS( nr ); tmp = TAG(emit_verts)( ctx, start, 1, tmp ); tmp = TAG(emit_verts)( ctx, j, nr - 1, tmp ); + (void) tmp; currentsz = dmasz; } -- cgit v1.2.3 From 588e9f69c4994d4e5bccdc8257a5aeb1e0b740d8 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 15:47:17 -0800 Subject: progs/trivial: Silence compiler warnings in tri-blend-min.c. --- progs/trivial/tri-blend-min.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/progs/trivial/tri-blend-min.c b/progs/trivial/tri-blend-min.c index 656297c0ce..629139acae 100644 --- a/progs/trivial/tri-blend-min.c +++ b/progs/trivial/tri-blend-min.c @@ -83,7 +83,7 @@ static void drawRightTriangle(void) glDisable (GL_BLEND); } -void display(void) +static void display(void) { glClear(GL_COLOR_BUFFER_BIT); @@ -99,7 +99,7 @@ void display(void) glFlush(); } -void reshape(int w, int h) +static void reshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); @@ -111,7 +111,7 @@ void reshape(int w, int h) } /* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) +static void keyboard(unsigned char key, int x, int y) { switch (key) { case 't': -- cgit v1.2.3 From af4e4a73f78cb5ccb5b0295a4683b2eae5325d8f Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 16:02:09 -0800 Subject: t_dd_dmatmp.h: Silence unused value warning in render_tri_fan_elts. --- src/mesa/tnl_dd/t_dd_dmatmp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h index 7eadfc6219..28771004b8 100644 --- a/src/mesa/tnl_dd/t_dd_dmatmp.h +++ b/src/mesa/tnl_dd/t_dd_dmatmp.h @@ -951,6 +951,7 @@ static void TAG(render_tri_fan_elts)( GLcontext *ctx, tmp = ALLOC_ELTS( nr ); tmp = TAG(emit_elts)( ctx, elts+start, 1, tmp ); tmp = TAG(emit_elts)( ctx, elts+j, nr - 1, tmp ); + (void) tmp; FLUSH(); currentsz = dmasz; } -- cgit v1.2.3 From 9dc018618d024cfbf1f342b0141bb6aab21f41b1 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 16:18:08 -0800 Subject: t_dd_dmatmp.h: Silence unused value warnings in render_line_loop_elts. --- src/mesa/tnl_dd/t_dd_dmatmp.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h index 28771004b8..7182978a17 100644 --- a/src/mesa/tnl_dd/t_dd_dmatmp.h +++ b/src/mesa/tnl_dd/t_dd_dmatmp.h @@ -825,6 +825,7 @@ static void TAG(render_line_loop_elts)( GLcontext *ctx, tmp = ALLOC_ELTS(nr+1); tmp = TAG(emit_elts)( ctx, elts+j, nr, tmp ); tmp = TAG(emit_elts)( ctx, elts+start, 1, tmp ); + (void) tmp; } else { TAG(emit_elts)( ctx, elts+j, nr, ALLOC_ELTS(nr) ); @@ -838,6 +839,7 @@ static void TAG(render_line_loop_elts)( GLcontext *ctx, tmp = ALLOC_ELTS(2); tmp = TAG(emit_elts)( ctx, elts+start+1, 1, tmp ); tmp = TAG(emit_elts)( ctx, elts+start, 1, tmp ); + (void) tmp; } FLUSH(); -- cgit v1.2.3 From 75e8dbb2351c6bdbda0e5eaefdf434a7a5518c75 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 16:24:25 -0800 Subject: i915g: Silence unused value warning in intel_drm_get_device_id. --- src/gallium/winsys/drm/intel/gem/intel_drm_api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/winsys/drm/intel/gem/intel_drm_api.c b/src/gallium/winsys/drm/intel/gem/intel_drm_api.c index 4c5a1d2ea8..01025659b9 100644 --- a/src/gallium/winsys/drm/intel/gem/intel_drm_api.c +++ b/src/gallium/winsys/drm/intel/gem/intel_drm_api.c @@ -31,6 +31,7 @@ intel_drm_get_device_id(unsigned int *device_id) } shutup_gcc = fgets(path, sizeof(path), file); + (void) shutup_gcc; sscanf(path, "%x", device_id); fclose(file); } -- cgit v1.2.3 From 7ea452dd35ba8ae063c70cc7fc916975c823ecd6 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 16:56:07 -0800 Subject: t_dd_dmatmp2.h: Silence unused value warnings. --- src/mesa/tnl_dd/t_dd_dmatmp2.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/mesa/tnl_dd/t_dd_dmatmp2.h b/src/mesa/tnl_dd/t_dd_dmatmp2.h index 2380c49fdf..cd225b6343 100644 --- a/src/mesa/tnl_dd/t_dd_dmatmp2.h +++ b/src/mesa/tnl_dd/t_dd_dmatmp2.h @@ -266,6 +266,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx, if (j + nr < count) { ELT_TYPE *dest = ALLOC_ELTS( nr ); dest = TAG(emit_consecutive_elts)( ctx, dest, j, nr ); + (void) dest; j += nr - 1; CLOSE_ELTS(); } @@ -273,6 +274,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx, ELT_TYPE *dest = ALLOC_ELTS( nr + 1 ); dest = TAG(emit_consecutive_elts)( ctx, dest, j, nr ); dest = TAG(emit_consecutive_elts)( ctx, dest, start, 1 ); + (void) dest; j += nr; CLOSE_ELTS(); } @@ -554,6 +556,7 @@ static void TAG(render_points_elts)( GLcontext *ctx, nr = MIN2( dmasz, count - j ); dest = ALLOC_ELTS( nr ); dest = TAG(emit_elts)( ctx, dest, elts+j, nr ); + (void) dest; CLOSE_ELTS(); } } @@ -590,6 +593,7 @@ static void TAG(render_lines_elts)( GLcontext *ctx, nr = MIN2( dmasz, count - j ); dest = ALLOC_ELTS( nr ); dest = TAG(emit_elts)( ctx, dest, elts+j, nr ); + (void) dest; CLOSE_ELTS(); } @@ -621,6 +625,7 @@ static void TAG(render_line_strip_elts)( GLcontext *ctx, nr = MIN2( dmasz, count - j ); dest = ALLOC_ELTS( nr ); dest = TAG(emit_elts)( ctx, dest, elts+j, nr ); + (void) dest; CLOSE_ELTS(); } } @@ -671,6 +676,7 @@ static void TAG(render_line_loop_elts)( GLcontext *ctx, j += nr - 1; if (j + 1 >= count && (flags & PRIM_END)) { dest = TAG(emit_elts)( ctx, dest, elts+start, 1 ); + (void) dest; } CLOSE_ELTS(); } @@ -703,6 +709,7 @@ static void TAG(render_triangles_elts)( GLcontext *ctx, nr = MIN2( dmasz, count - j ); dest = ALLOC_ELTS( nr ); dest = TAG(emit_elts)( ctx, dest, elts+j, nr ); + (void) dest; CLOSE_ELTS(); } } @@ -734,6 +741,7 @@ static void TAG(render_tri_strip_elts)( GLcontext *ctx, dest = ALLOC_ELTS( nr ); dest = TAG(emit_elts)( ctx, dest, elts+j, nr ); + (void) dest; CLOSE_ELTS(); } } @@ -759,6 +767,7 @@ static void TAG(render_tri_fan_elts)( GLcontext *ctx, dest = ALLOC_ELTS( nr ); dest = TAG(emit_elts)( ctx, dest, elts+start, 1 ); dest = TAG(emit_elts)( ctx, dest, elts+j, nr - 1 ); + (void) dest; CLOSE_ELTS(); } } @@ -785,6 +794,7 @@ static void TAG(render_poly_elts)( GLcontext *ctx, dest = ALLOC_ELTS( nr ); dest = TAG(emit_elts)( ctx, dest, elts+start, 1 ); dest = TAG(emit_elts)( ctx, dest, elts+j, nr - 1 ); + (void) dest; CLOSE_ELTS(); } } @@ -843,6 +853,7 @@ static void TAG(render_quad_strip_elts)( GLcontext *ctx, nr = MIN2( dmasz, count - j ); dest = ALLOC_ELTS( nr ); dest = TAG(emit_elts)( ctx, dest, elts+j, nr ); + (void) dest; CLOSE_ELTS(); } } -- cgit v1.2.3 From f8d4ac56f7596613730fa4961d9b7b2e8d042055 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 18:34:15 -0800 Subject: softpipe: Initialize source in blend_quad. --- src/gallium/drivers/softpipe/sp_quad_blend.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/softpipe/sp_quad_blend.c b/src/gallium/drivers/softpipe/sp_quad_blend.c index b1e18805c7..43ed4c2494 100644 --- a/src/gallium/drivers/softpipe/sp_quad_blend.c +++ b/src/gallium/drivers/softpipe/sp_quad_blend.c @@ -258,7 +258,8 @@ blend_quad(struct quad_stage *qs, struct quad_header *quad) /* loop over colorbuffer outputs */ for (cbuf = 0; cbuf < softpipe->framebuffer.nr_cbufs; cbuf++) { - float source[4][QUAD_SIZE], dest[4][QUAD_SIZE]; + float source[4][QUAD_SIZE] = { { 0 } }; + float dest[4][QUAD_SIZE]; struct softpipe_cached_tile *tile = sp_get_cached_tile(softpipe, softpipe->cbuf_cache[cbuf], -- cgit v1.2.3 From cd1a09e3bbdb907e3b806e68400804310dc168ce Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 18:42:18 -0800 Subject: glsl: Initialize member label of struct slang_operation to NULL. --- src/mesa/shader/slang/slang_compile_operation.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c index 3e2bdbc91f..be73094ca0 100644 --- a/src/mesa/shader/slang/slang_compile_operation.c +++ b/src/mesa/shader/slang/slang_compile_operation.c @@ -52,6 +52,7 @@ slang_operation_construct(slang_operation * oper) _slang_variable_scope_ctr(oper->locals); oper->fun = NULL; oper->var = NULL; + oper->label = NULL; return GL_TRUE; } -- cgit v1.2.3 From 20590b97336c4ebe5d2bcee51d66820e1e5d26c8 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 20:20:02 -0800 Subject: t_dd_dmatmp.h: Silence unused value warning in render_poly_elts. --- src/mesa/tnl_dd/t_dd_dmatmp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h index 7182978a17..d568bfdb58 100644 --- a/src/mesa/tnl_dd/t_dd_dmatmp.h +++ b/src/mesa/tnl_dd/t_dd_dmatmp.h @@ -991,6 +991,7 @@ static void TAG(render_poly_elts)( GLcontext *ctx, tmp = ALLOC_ELTS( nr ); tmp = TAG(emit_elts)( ctx, elts+start, 1, tmp ); tmp = TAG(emit_elts)( ctx, elts+j, nr - 1, tmp ); + (void) tmp; FLUSH(); currentsz = dmasz; } -- cgit v1.2.3 From 89d85e8170e38e04790a2c10541dec01fee9afd2 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 21:46:13 -0800 Subject: glut: Prevent potential double free in menuVisualSetup. --- src/glut/glx/glut_menu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/glut/glx/glut_menu.c b/src/glut/glx/glut_menu.c index 4c4a5ae750..d136823c54 100644 --- a/src/glut/glx/glut_menu.c +++ b/src/glut/glx/glut_menu.c @@ -225,6 +225,7 @@ menuVisualSetup(void) if (!status) { XFreeColormap(__glutDisplay, menuColormap); free(placeHolders); + placeHolders = NULL; continue; } } @@ -241,6 +242,7 @@ menuVisualSetup(void) XFreeColormap(__glutDisplay, menuColormap); if (placeHolders) { free(placeHolders); + placeHolders = NULL; } continue; } @@ -252,6 +254,7 @@ menuVisualSetup(void) XFreeColormap(__glutDisplay, menuColormap); if (placeHolders) { free(placeHolders); + placeHolders = NULL; } continue; } @@ -263,6 +266,7 @@ menuVisualSetup(void) XFreeColormap(__glutDisplay, menuColormap); if (placeHolders) { free(placeHolders); + placeHolders = NULL; } continue; } @@ -271,6 +275,7 @@ menuVisualSetup(void) XFreeColors(__glutDisplay, menuColormap, placeHolders, numPlaceHolders, 0); free(placeHolders); + placeHolders = NULL; } menuWhite = color.pixel; menuVisual = visual->vinfo.visual; -- cgit v1.2.3 From 0aef54ba627c748a43f601228c725f5ba79be002 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 22:00:19 -0800 Subject: swrast: Silence uninitialized variable warnings in ss_tritmp.h. --- src/mesa/swrast_setup/ss_tritmp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h index 724b5e94fa..bd20a8d972 100644 --- a/src/mesa/swrast_setup/ss_tritmp.h +++ b/src/mesa/swrast_setup/ss_tritmp.h @@ -41,9 +41,9 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) GLenum mode = GL_FILL; GLuint facing = 0; GLchan saved_color[3][4]; - GLfloat saved_col0[3][4]; - GLfloat saved_spec[3][4]; - GLfloat saved_index[3]; + GLfloat saved_col0[3][4] = { { 0 } }; + GLfloat saved_spec[3][4] = { { 0 } }; + GLfloat saved_index[3] = { 0 }; v[0] = &verts[e0]; v[1] = &verts[e1]; -- cgit v1.2.3 From aa44efb04504fb6f8a1a2ff9d99388d173f7181a Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 22:17:16 -0800 Subject: st/mesa: Silence uninitialized variables warnings in st_draw.c. --- src/mesa/state_tracker/st_draw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index c76bff9181..6f5248cbe5 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -371,7 +371,7 @@ setup_interleaved_attribs(GLcontext *ctx, { struct pipe_context *pipe = ctx->st->pipe; GLuint attr; - const GLubyte *offset0; + const GLubyte *offset0 = NULL; for (attr = 0; attr < vp->num_inputs; attr++) { const GLuint mesaAttr = vp->index_to_input[attr]; @@ -550,7 +550,7 @@ st_draw_vbo(GLcontext *ctx, GLuint attr; struct pipe_vertex_element velements[PIPE_MAX_ATTRIBS]; unsigned num_vbuffers, num_velements; - GLboolean userSpace; + GLboolean userSpace = GL_FALSE; /* Gallium probably doesn't want this in some cases. */ if (!index_bounds_valid) -- cgit v1.2.3 From 555dc25c4c5a0991fb6846ccc263a195717512de Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 12 Dec 2009 23:47:32 -0800 Subject: swrast: Silence uninitialized variable warnings in s_triangle.c --- src/mesa/swrast/s_triangle.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index 1ab0e19f92..a65b7b3e22 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -540,6 +540,9 @@ affine_span(GLcontext *ctx, SWspan *span, info.format = obj->Image[0][b]->_BaseFormat; \ info.filter = obj->MinFilter; \ info.envmode = unit->EnvMode; \ + info.er = 0; \ + info.eg = 0; \ + info.eb = 0; \ span.arrayMask |= SPAN_RGBA; \ \ if (info.envmode == GL_BLEND) { \ @@ -809,6 +812,9 @@ fast_persp_span(GLcontext *ctx, SWspan *span, info.format = obj->Image[0][b]->_BaseFormat; \ info.filter = obj->MinFilter; \ info.envmode = unit->EnvMode; \ + info.er = 0; \ + info.eg = 0; \ + info.eb = 0; \ \ if (info.envmode == GL_BLEND) { \ /* potential off-by-one error here? (1.0f -> 2048 -> 0) */ \ -- cgit v1.2.3 From 6c9870b54c1aad42ead5b2655c19c42343b8bf84 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 13 Dec 2009 00:14:31 -0800 Subject: i810: Silence uninitialized variable warnings in i180tris.c --- src/mesa/drivers/dri/i810/i810tris.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i810/i810tris.c b/src/mesa/drivers/dri/i810/i810tris.c index b508496fb6..213ba541ce 100644 --- a/src/mesa/drivers/dri/i810/i810tris.c +++ b/src/mesa/drivers/dri/i810/i810tris.c @@ -270,7 +270,8 @@ do { \ #define LOCAL_VARS(n) \ i810ContextPtr imesa = I810_CONTEXT(ctx); \ - GLuint color[n], spec[n]; \ + GLuint color[n] = { 0 }; \ + GLuint spec[n] = { 0 }; \ GLuint coloroffset = (imesa->vertex_size == 4 ? 3 : 4); \ GLboolean havespec = (imesa->vertex_size > 4); \ (void) color; (void) spec; (void) coloroffset; (void) havespec; -- cgit v1.2.3 From b18fa9f44810cde45519368170a505cdd0ebb936 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 14 Dec 2009 17:20:34 -0800 Subject: mach64: Silence uninitialized variable warnings. --- src/mesa/drivers/dri/mach64/mach64_tris.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/mach64/mach64_tris.c b/src/mesa/drivers/dri/mach64/mach64_tris.c index f2e8e2e3ae..c2a0adfef0 100644 --- a/src/mesa/drivers/dri/mach64/mach64_tris.c +++ b/src/mesa/drivers/dri/mach64/mach64_tris.c @@ -1297,7 +1297,8 @@ do { \ #define LOCAL_VARS(n) \ mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); \ - GLuint color[n], spec[n]; \ + GLuint color[n] = { 0 }; \ + GLuint spec[n] = { 0 }; \ GLuint vertex_size = mmesa->vertex_size; \ const GLuint xyoffset = 9; \ const GLuint coloroffset = 8; \ -- cgit v1.2.3 From 6e5fe39f5051bb758b98ed4b9a2b9d550b588edf Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 14 Dec 2009 17:30:15 -0800 Subject: mga: Silence uninitialized variable warnings. --- src/mesa/drivers/dri/mga/mgatris.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/mga/mgatris.c b/src/mesa/drivers/dri/mga/mgatris.c index b93a21c3ac..c1bcd4b853 100644 --- a/src/mesa/drivers/dri/mga/mgatris.c +++ b/src/mesa/drivers/dri/mga/mgatris.c @@ -397,7 +397,8 @@ do { \ #define LOCAL_VARS(n) \ mgaContextPtr mmesa = MGA_CONTEXT(ctx); \ - GLuint color[n], spec[n]; \ + GLuint color[n] = { 0 }; \ + GLuint spec[n] = { 0 }; \ (void) color; (void) spec; -- cgit v1.2.3 From 0a8d508854c6dd354e611b046e375b8633059a40 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 14 Dec 2009 18:11:57 -0800 Subject: progs/trivial: Silence compiler warnings. --- progs/trivial/tri-blend-revsub.c | 6 +++--- progs/trivial/tri-blend-sub.c | 6 +++--- progs/trivial/tri-blend.c | 6 +++--- progs/trivial/tri-fbo-tex.c | 3 --- progs/trivial/tri-z.c | 6 +++--- 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/progs/trivial/tri-blend-revsub.c b/progs/trivial/tri-blend-revsub.c index fe225f1f4e..ef1e92c85d 100644 --- a/progs/trivial/tri-blend-revsub.c +++ b/progs/trivial/tri-blend-revsub.c @@ -83,7 +83,7 @@ static void drawRightTriangle(void) glDisable (GL_BLEND); } -void display(void) +static void display(void) { glClear(GL_COLOR_BUFFER_BIT); @@ -99,7 +99,7 @@ void display(void) glFlush(); } -void reshape(int w, int h) +static void reshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); @@ -111,7 +111,7 @@ void reshape(int w, int h) } /* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) +static void keyboard(unsigned char key, int x, int y) { switch (key) { case 't': diff --git a/progs/trivial/tri-blend-sub.c b/progs/trivial/tri-blend-sub.c index cc1aeaf4a4..3c560ae6ef 100644 --- a/progs/trivial/tri-blend-sub.c +++ b/progs/trivial/tri-blend-sub.c @@ -83,7 +83,7 @@ static void drawRightTriangle(void) glDisable (GL_BLEND); } -void display(void) +static void display(void) { glClear(GL_COLOR_BUFFER_BIT); @@ -99,7 +99,7 @@ void display(void) glFlush(); } -void reshape(int w, int h) +static void reshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); @@ -111,7 +111,7 @@ void reshape(int w, int h) } /* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) +static void keyboard(unsigned char key, int x, int y) { switch (key) { case 't': diff --git a/progs/trivial/tri-blend.c b/progs/trivial/tri-blend.c index 58c451c976..f41be89b09 100644 --- a/progs/trivial/tri-blend.c +++ b/progs/trivial/tri-blend.c @@ -81,7 +81,7 @@ static void drawRightTriangle(void) glDisable (GL_BLEND); } -void display(void) +static void display(void) { glClear(GL_COLOR_BUFFER_BIT); @@ -97,7 +97,7 @@ void display(void) glFlush(); } -void reshape(int w, int h) +static void reshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); @@ -109,7 +109,7 @@ void reshape(int w, int h) } /* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) +static void keyboard(unsigned char key, int x, int y) { switch (key) { case 't': diff --git a/progs/trivial/tri-fbo-tex.c b/progs/trivial/tri-fbo-tex.c index 72b4cf3683..8d1f871328 100644 --- a/progs/trivial/tri-fbo-tex.c +++ b/progs/trivial/tri-fbo-tex.c @@ -189,9 +189,6 @@ Key(unsigned char key, int x, int y) static void Init(int argc, char *argv[]) { - static const GLfloat mat[4] = { 1.0, 0.5, 0.5, 1.0 }; - GLint i; - if (!glutExtensionSupported("GL_EXT_framebuffer_object")) { printf("GL_EXT_framebuffer_object not found!\n"); exit(0); diff --git a/progs/trivial/tri-z.c b/progs/trivial/tri-z.c index 014aaa071a..092249dd76 100644 --- a/progs/trivial/tri-z.c +++ b/progs/trivial/tri-z.c @@ -101,7 +101,7 @@ static void drawRightTriangle(void) glEnd(); } -void display(void) +static void display(void) { printf("GL_CLEAR_DEPTH = %.2f, GL_DEPTH_FUNC = %s, DepthRange(%.1f, %.1f)\n", clearVal, funcs[curFunc].str, minZ, maxZ); @@ -124,7 +124,7 @@ void display(void) glFlush(); } -void reshape(int w, int h) +static void reshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); @@ -136,7 +136,7 @@ void reshape(int w, int h) } /* ARGSUSED1 */ -void keyboard(unsigned char key, int x, int y) +static void keyboard(unsigned char key, int x, int y) { switch (key) { case 'n': -- cgit v1.2.3 From 22d2547ad1cac1f91e839f646918ef7df6293ae9 Mon Sep 17 00:00:00 2001 From: Matthew Bell Date: Mon, 14 Dec 2009 21:58:19 -0700 Subject: mesa: Add missing $(DESTDIR) support to src/gallium/winsys/xlib/Makefile --- src/gallium/winsys/xlib/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/winsys/xlib/Makefile b/src/gallium/winsys/xlib/Makefile index 3a1945d92c..f34609386d 100644 --- a/src/gallium/winsys/xlib/Makefile +++ b/src/gallium/winsys/xlib/Makefile @@ -87,11 +87,11 @@ depend: $(XLIB_WINSYS_SOURCES) install: default - $(INSTALL) -d $(INSTALL_DIR)/include/GL - $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR) - $(INSTALL) -m 644 $(TOP)/include/GL/*.h $(INSTALL_DIR)/include/GL + $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL + $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR) + $(INSTALL) -m 644 $(TOP)/include/GL/*.h $(DESTDIR)$(INSTALL_DIR)/include/GL @if [ -e $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) ]; then \ - $(MINSTALL) $(TOP)/$(LIB_DIR)/libGL* $(INSTALL_DIR)/$(LIB_DIR); \ + $(MINSTALL) $(TOP)/$(LIB_DIR)/libGL* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \ fi -- cgit v1.2.3 From 987e9188d25e7c49eb7e6fe64dbe63dd2cfc25ef Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 15 Dec 2009 12:32:48 -0800 Subject: x86: ifdef out unused function cptr. --- src/mesa/x86/rtasm/x86sse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c index 5aedf5b04b..647be995c1 100644 --- a/src/mesa/x86/rtasm/x86sse.c +++ b/src/mesa/x86/rtasm/x86sse.c @@ -7,10 +7,12 @@ #define DISASSEM 0 #define X86_TWOB 0x0f +#if 0 static unsigned char *cptr( void (*label)() ) { return (unsigned char *)(unsigned long)label; } +#endif static void do_realloc( struct x86_function *p ) -- cgit v1.2.3 From f23d01e726a57cd6b8e31f1049ee5853773df7ea Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 15 Dec 2009 12:14:04 -0800 Subject: intel: Fallback to software if drawable size is > MaxRenderbufferSize This prevents the mystery blank window if, for example, glxgears is resized larger than 2048 wide on 915. Since the Intel drivers in Mesa 7.6 lack GTT mapped fallbacks, the performance is a slideshow at best. On Mesa 7.7 and later the performance is much better. --- src/mesa/drivers/dri/intel/intel_buffers.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c index e7357e78c5..4b8ac364f7 100644 --- a/src/mesa/drivers/dri/intel/intel_buffers.c +++ b/src/mesa/drivers/dri/intel/intel_buffers.c @@ -172,10 +172,15 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb) return; } - /* - * How many color buffers are we drawing into? + /* How many color buffers are we drawing into? + * + * If there are zero buffers or the buffer is too big, don't configure any + * regions for hardware drawing. We'll fallback to software below. Not + * having regions set makes some of the software fallback paths faster. */ - if (fb->_NumColorDrawBuffers == 0) { + if ((fb->Width > ctx->Const.MaxRenderbufferSize) + || (fb->Height > ctx->Const.MaxRenderbufferSize) + || (fb->_NumColorDrawBuffers == 0)) { /* writing to 0 */ colorRegions[0] = NULL; intel->constant_cliprect = GL_TRUE; -- cgit v1.2.3