mesa: include stdio.h where needed
[mesa.git] / src / mesa / vbo / vbo_exec_array.c
index c16fe77ee09012f607416162182fb1791cc758e3..3ea775c0e4a5b092288863708dd1f88dd051e840 100644 (file)
@@ -26,6 +26,7 @@
  * 
  **************************************************************************/
 
+#include <stdio.h>
 #include "main/glheader.h"
 #include "main/context.h"
 #include "main/state.h"
@@ -181,8 +182,7 @@ vbo_get_minmax_index(struct gl_context *ctx,
       break;
    }
    default:
-      assert(0);
-      break;
+      unreachable("not reached");
    }
 
    if (_mesa_is_bufferobj(ib->obj)) {
@@ -331,7 +331,7 @@ check_draw_elements_data(struct gl_context *ctx, GLsizei count, GLenum elemType,
       }
 
       /* check element j of each enabled array */
-      for (k = 0; k < Elements(vao->_VertexAttrib); k++) {
+      for (k = 0; k < ARRAY_SIZE(vao->_VertexAttrib); k++) {
          check_array_data(ctx, &vao->_VertexAttrib[k], k, j);
       }
    }
@@ -341,7 +341,7 @@ check_draw_elements_data(struct gl_context *ctx, GLsizei count, GLenum elemType,
                               MAP_INTERNAL);
    }
 
-   for (k = 0; k < Elements(vao->_VertexAttrib); k++) {
+   for (k = 0; k < ARRAY_SIZE(vao->_VertexAttrib); k++) {
       unmap_array_buffer(ctx, &vao->_VertexAttrib[k]);
    }
 }