Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define MAX_VARYING 32
- typedef enum
- {
- ....
- FRAG_ATTRIB_VAR0 = 16,
- FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + MAX_VARYING)
- } gl_frag_attrib;
- static inline GLuint
- clip_span( struct gl_context *ctx, SWspan *span )
- {
- ....
- for (i = 0; i < FRAG_ATTRIB_MAX; i++) {
- if (span->interpMask & (1 << i)) {
- ....
- }
- This suspicious code was found in MesaLib project by PVS-Studio static code analyzer.
- Warning message is:
- V610 Undefined behavior. Check the shift operator '<<. The right operand ('i' = [0..47]) is greater than or equal to the length in bits of the promoted left operand. s_span.c 768
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment