vbo: if 'end' is out of bounds, clamp it
[mesa.git] / progs / tests / getprocaddress.c
index a09ea58e1da64e9802b3bad115d040b53ff0d262..38ca7000df24b081a2368ac5abda6975098fa25b 100644 (file)
@@ -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);
@@ -1188,7 +1188,7 @@ exercise_buffer_objects(enum Map_Buffer_Usage usage)
    GLuint bufferID;
    GLint bufferMapped;
    static GLubyte data[BUFFER_DATA_SIZE] = {0};
-   float *dataPtr;
+   float *dataPtr = NULL;
 
    /* Get the function pointers we need.  These are from
     * GL_ARB_vertex_buffer_object and are required in all
@@ -3516,7 +3516,7 @@ check_functions( const char *extensions )
    struct name_test_pair *entry;
    int failures = 0, passes = 0, untested = 0;
    int totalFail = 0, totalPass = 0, totalUntested = 0, totalUnsupported = 0;
-   int doTests;
+   int doTests = 0;
    const char *version = (const char *) glGetString(GL_VERSION);
 
    /* The functions list will have "real" entries (consisting of