diff options
author | Jakob Bornecrantz <[email protected]> | 2010-01-14 22:31:04 +0000 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2010-01-14 22:31:04 +0000 |
commit | b01ffb12ed82dcf435b186e2aff35e344a8a6ebe (patch) | |
tree | a62ee3f8f402f0c34ac88b5011da41a9cab8c6e3 /progs | |
parent | ffd28480560caecfb676a4bbe85a85672271e3f7 (diff) | |
parent | 252812bf15c3479d921157b9a432c7e42d3b9446 (diff) |
Merge branch 'mesa_7_7_branch'
Conflicts:
src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
src/gallium/auxiliary/util/Makefile
src/gallium/drivers/r300/r300_state_derived.c
Diffstat (limited to 'progs')
-rw-r--r-- | progs/demos/engine.c | 18 | ||||
-rw-r--r-- | progs/demos/fbotexture.c | 1 | ||||
-rw-r--r-- | progs/demos/fire.c | 8 | ||||
-rw-r--r-- | progs/demos/isosurf.c | 1 | ||||
-rw-r--r-- | progs/demos/morph3d.c | 1 | ||||
-rw-r--r-- | progs/glsl/convolutions.c | 2 | ||||
-rw-r--r-- | progs/glsl/shtest.c | 1 | ||||
-rw-r--r-- | progs/redbook/aapoly.c | 1 | ||||
-rw-r--r-- | progs/tests/getprocaddress.c | 4 | ||||
-rw-r--r-- | progs/tests/interleave.c | 2 | ||||
-rw-r--r-- | progs/tests/texwrap.c | 2 | ||||
-rw-r--r-- | progs/tests/vparray.c | 3 | ||||
-rw-r--r-- | progs/trivial/tri-fbo-tex-mip.c | 1 | ||||
-rw-r--r-- | progs/trivial/tri-fbo-tex.c | 2 | ||||
-rw-r--r-- | progs/xdemos/corender.c | 1 | ||||
-rw-r--r-- | progs/xdemos/manywin.c | 2 |
16 files changed, 30 insertions, 20 deletions
diff --git a/progs/demos/engine.c b/progs/demos/engine.c index c54e3b8fb80..7e485111da7 100644 --- a/progs/demos/engine.c +++ b/progs/demos/engine.c @@ -120,7 +120,11 @@ static Engine Engines[NUM_ENGINES] = 0.3, /* CrankJournalRadius */ 0.4, /* CrankJournalLength */ 1.5, /* ConnectingRodLength */ - 0.1 /* ConnectingRodThickness */ + 0.1, /* ConnectingRodThickness */ + 0, /* CrankList */ + 0, /* ConnRodList */ + 0, /* PistonList */ + 0 /* BlockList */ }, { "Inline-4", @@ -136,7 +140,11 @@ static Engine Engines[NUM_ENGINES] = 0.3, /* CrankJournalRadius */ 0.4, /* CrankJournalLength */ 1.5, /* ConnectingRodLength */ - 0.1 /* ConnectingRodThickness */ + 0.1, /* ConnectingRodThickness */ + 0, /* CrankList */ + 0, /* ConnRodList */ + 0, /* PistonList */ + 0 /* BlockList */ }, { "Boxer-6", @@ -152,7 +160,11 @@ static Engine Engines[NUM_ENGINES] = 0.3, /* CrankJournalRadius */ 0.4, /* CrankJournalLength */ 1.5, /* ConnectingRodLength */ - 0.1 /* ConnectingRodThickness */ + 0.1, /* ConnectingRodThickness */ + 0, /* CrankList */ + 0, /* ConnRodList */ + 0, /* PistonList */ + 0 /* BlockList */ } }; diff --git a/progs/demos/fbotexture.c b/progs/demos/fbotexture.c index 56482663dc4..46bf1c5f6a2 100644 --- a/progs/demos/fbotexture.c +++ b/progs/demos/fbotexture.c @@ -14,7 +14,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <math.h> #include "extfuncs.h" /* For debug */ diff --git a/progs/demos/fire.c b/progs/demos/fire.c index 9c351e80e51..bb912fb4473 100644 --- a/progs/demos/fire.c +++ b/progs/demos/fire.c @@ -726,8 +726,13 @@ main(int ac, char **av) maxage = 1.0 / dt; - if (ac == 2) + if (ac == 2) { np = atoi(av[1]); + if (np <= 0 || np > 1000000) { + fprintf(stderr, "Invalid input.\n"); + exit(-1); + } + } if (ac == 4) { WIDTH = atoi(av[2]); @@ -761,6 +766,7 @@ main(int ac, char **av) assert(np > 0); p = (part *) malloc(sizeof(part) * np); + assert(p); for (i = 0; i < np; i++) setnewpart(&p[i]); diff --git a/progs/demos/isosurf.c b/progs/demos/isosurf.c index dbe4d8d172a..a5b21ffb5c3 100644 --- a/progs/demos/isosurf.c +++ b/progs/demos/isosurf.c @@ -27,7 +27,6 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> -#include <string.h> #include <math.h> #ifdef _WIN32 #include <windows.h> diff --git a/progs/demos/morph3d.c b/progs/demos/morph3d.c index 0f8ac426f33..07458eb156f 100644 --- a/progs/demos/morph3d.c +++ b/progs/demos/morph3d.c @@ -137,7 +137,6 @@ So the angle is: #endif #include <GL/glut.h> #include <math.h> -#include <string.h> #define Scale 0.3 diff --git a/progs/glsl/convolutions.c b/progs/glsl/convolutions.c index 350e61bbdc5..fdfaf568a25 100644 --- a/progs/glsl/convolutions.c +++ b/progs/glsl/convolutions.c @@ -182,7 +182,7 @@ static void fillConvolution(GLint *k, static void setupConvolution() { GLint *kernel = (GLint*)malloc(sizeof(GLint) * 9); - GLfloat scale; + GLfloat scale = 0.0; GLfloat *vecKer = (GLfloat*)malloc(sizeof(GLfloat) * 9 * 4); GLuint loc; GLuint i; diff --git a/progs/glsl/shtest.c b/progs/glsl/shtest.c index 7b1917be1ce..520eccfb6d8 100644 --- a/progs/glsl/shtest.c +++ b/progs/glsl/shtest.c @@ -29,7 +29,6 @@ #include <assert.h> -#include <string.h> #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/progs/redbook/aapoly.c b/progs/redbook/aapoly.c index b7b2b270902..64d06b7b3da 100644 --- a/progs/redbook/aapoly.c +++ b/progs/redbook/aapoly.c @@ -45,7 +45,6 @@ #include <GL/glut.h> #include <stdlib.h> #include <stdio.h> -#include <string.h> GLboolean polySmooth = GL_TRUE; diff --git a/progs/tests/getprocaddress.c b/progs/tests/getprocaddress.c index e699baf44bc..38ca7000df2 100644 --- a/progs/tests/getprocaddress.c +++ b/progs/tests/getprocaddress.c @@ -660,8 +660,8 @@ exercise_CompressedTextures(GLenum dimension) glGetTexLevelParameteriv(dimension, 0, GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB, &queryCompressedSize); if (queryCompressedSize != sizeof(compressedTexture)) { - fprintf(stderr, "%s: compressed 3D texture changed size: expected %d, actual %d\n", - __FUNCTION__, sizeof(compressedTexture), queryCompressedSize); + fprintf(stderr, "%s: compressed 3D texture changed size: expected %lu, actual %d\n", + __FUNCTION__, (unsigned long) sizeof(compressedTexture), queryCompressedSize); return GL_FALSE; } (*GetCompressedTexImageARB)(dimension, 0, queryCompressedData); diff --git a/progs/tests/interleave.c b/progs/tests/interleave.c index 47bf9dfbe5e..acf67d02c12 100644 --- a/progs/tests/interleave.c +++ b/progs/tests/interleave.c @@ -105,7 +105,7 @@ static const unsigned indicies[12] = { 1, 4, 2 }; -#define NONE { NULL, 0, 0, 0 } +#define NONE { NULL, 0, 0, 0, sizeof( NULL ) } #define V2F { v, 2, 2 * sizeof( GLfloat ), GL_FLOAT, sizeof( v[0] ) } #define V3F { v, 3, 3 * sizeof( GLfloat ), GL_FLOAT, sizeof( v[0] ) } #define V4F { v, 4, 4 * sizeof( GLfloat ), GL_FLOAT, sizeof( v[0] ) } diff --git a/progs/tests/texwrap.c b/progs/tests/texwrap.c index 92c8a2f14c2..39c55919dd2 100644 --- a/progs/tests/texwrap.c +++ b/progs/tests/texwrap.c @@ -71,7 +71,7 @@ static struct wrap_mode modes[] = { WRAP_EXT ( GL_MIRROR_CLAMP_TO_EDGE_EXT, "GL_ATI_texture_mirror_once", "GL_EXT_texture_mirror_clamp", 999.0 ), - { 0 } + { 0, NULL, GL_FALSE, 0.0, { NULL, NULL } } }; static void diff --git a/progs/tests/vparray.c b/progs/tests/vparray.c index fe168c6cd56..75160afd463 100644 --- a/progs/tests/vparray.c +++ b/progs/tests/vparray.c @@ -8,7 +8,6 @@ #include <assert.h> #include <stdio.h> -#include <string.h> #include <stdlib.h> #include <string.h> #include <math.h> @@ -183,7 +182,7 @@ static void init_program(void) static const GLfloat bias[4] = {1.0, 1.0, 1.0, 0.0}; if (!glutExtensionSupported("GL_NV_vertex_program")) { - printf("Sorry, this program requires GL_NV_vertex_program"); + printf("Sorry, this program requires GL_NV_vertex_program\n"); exit(1); } diff --git a/progs/trivial/tri-fbo-tex-mip.c b/progs/trivial/tri-fbo-tex-mip.c index 07443695011..df4725c7b4e 100644 --- a/progs/trivial/tri-fbo-tex-mip.c +++ b/progs/trivial/tri-fbo-tex-mip.c @@ -6,7 +6,6 @@ #include <assert.h> #include <stdio.h> #include <stdlib.h> -#include <string.h> #include <math.h> /* For debug */ diff --git a/progs/trivial/tri-fbo-tex.c b/progs/trivial/tri-fbo-tex.c index 8d1f871328d..eacb7d577be 100644 --- a/progs/trivial/tri-fbo-tex.c +++ b/progs/trivial/tri-fbo-tex.c @@ -6,8 +6,6 @@ #include <assert.h> #include <stdio.h> #include <stdlib.h> -#include <string.h> -#include <math.h> /* For debug */ diff --git a/progs/xdemos/corender.c b/progs/xdemos/corender.c index 640c902c136..e706f4b3da5 100644 --- a/progs/xdemos/corender.c +++ b/progs/xdemos/corender.c @@ -20,7 +20,6 @@ #include <math.h> #include <stdio.h> #include <stdlib.h> -#include <string.h> #include <X11/keysym.h> #include <unistd.h> #include "ipc.h" diff --git a/progs/xdemos/manywin.c b/progs/xdemos/manywin.c index 3b0810b2e54..8ad5c4fe49f 100644 --- a/progs/xdemos/manywin.c +++ b/progs/xdemos/manywin.c @@ -400,6 +400,8 @@ main(int argc, char *argv[]) } if (n < 1) n = 1; + if (n > MAX_HEADS) + n = MAX_HEADS; printf("%d windows\n", n); for (i = 0; i < n; i++) { |