summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorRob Herring <[email protected]>2017-05-31 19:07:40 -0500
committerRob Herring <[email protected]>2017-06-07 20:44:26 -0500
commit18348a383dae41567fd333db6f848fbc8ff7d99b (patch)
treecc018cacfd7de3350a127df1ea8f88f7da387cab /src/mesa
parent4453fbb02447288e21206a676a24ff70b64857b1 (diff)
glsl: fix bounds check in blob_overwrite_bytes
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 the less than 0 check to fix this. Additionally, if offset is greater than blob->size, the 2nd check would be false due to unsigned math. Rewrite the check to avoid subtraction. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Rob Herring <[email protected]>
Diffstat (limited to 'src/mesa')
0 files changed, 0 insertions, 0 deletions