commit 865b1c2828276b95e523ed310c39ce6731d07dff
parent a741081ad9a5b9ace6add93b787baa77405d6107
Author: Nicolas Silva <nical@fastmail.com>
Date: Tue, 7 Oct 2025 07:39:02 +0000
Bug 1992072 - Don't check that size is positive since it is unsigned. r=gfx-reviewers,lsalzman
Addresses -Wtype-limits warnings when building swgl.
Differential Revision: https://phabricator.services.mozilla.com/D267181
Diffstat:
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/gfx/wr/swgl/src/gl.cc b/gfx/wr/swgl/src/gl.cc
@@ -2247,10 +2247,6 @@ void VertexAttribDivisor(GLuint index, GLuint divisor) {
void BufferData(GLenum target, GLsizeiptr size, void* data,
UNUSED GLenum usage) {
- if (size < 0) {
- assert(0);
- return;
- }
Buffer& b = ctx->buffers[ctx->get_binding(target)];
if (size != b.size) {
if (!b.allocate(size)) {
@@ -2265,7 +2261,7 @@ void BufferData(GLenum target, GLsizeiptr size, void* data,
void BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size,
void* data) {
- if (offset < 0 || size < 0) {
+ if (offset < 0) {
assert(0);
return;
}