Re: [Mesa-dev] [PATCH] glsl: fix bounds check in blob_overwrite_bytes

2017-06-01 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Wed, 2017-05-31 at 19:14 -0500, Rob Herring wrote: > clang gives a warning in blob_overwrite_bytes because offset type is > size_t which is unsigned: > > src/compiler/glsl/blob.c:110:15: warning: comparison of unsigned > expression < 0 is always false [-Wtautol

[Mesa-dev] [PATCH] glsl: fix bounds check in blob_overwrite_bytes

2017-05-31 Thread Rob Herring
clang gives a warning in blob_overwrite_bytes because offset type is size_t which is unsigned: src/compiler/glsl/blob.c:110:15: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if (offset < 0 || blob->size - offset < to_write) ~~ ^ ~ Remove th