mesa/main: fix gl_buffer_index enum comparison
authorRob Herring <robh@kernel.org>
Tue, 30 May 2017 20:30:38 +0000 (15:30 -0500)
committerRob Herring <robh@kernel.org>
Thu, 8 Jun 2017 01:44:26 +0000 (20:44 -0500)
commitf4b5510872b94a434a5223e35a67db322aad5e8b
treeb3002db5c1f8a80711bdca45df3ec6aabf39931a
parent18348a383dae41567fd333db6f848fbc8ff7d99b
mesa/main: fix gl_buffer_index enum comparison

For clang, enums are unsigned by default and gives the following warning:

external/mesa3d/src/mesa/main/buffers.c:764:21: warning: comparison of constant -1 with expression of type 'gl_buffer_index' is always false [-Wtautological-constant-out-of-range-compare]
      if (srcBuffer == -1) {
          ~~~~~~~~~ ^  ~~

Replace -1 with an enum value to fix this.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
src/mesa/main/buffers.c
src/mesa/main/framebuffer.c
src/mesa/main/mtypes.h