libavcodec/mpc7.c:123: error: Integer Overflow L2
  ([0, 1020] - 510):unsigned32.

libavcodec/mpc7.c:123:23: <LHS trace>
121.     case -1:
122.         for(i = 0; i < SAMPLES_PER_BAND; i++){
123.             *dst++ = (av_random(&c->rnd) & 0x3FC) - 510;
                           ^
124.         }
125.         break;

libavcodec/mpc7.c:123:23: Call
121.     case -1:
122.         for(i = 0; i < SAMPLES_PER_BAND; i++){
123.             *dst++ = (av_random(&c->rnd) & 0x3FC) - 510;
                           ^
124.         }
125.         break;

libavutil/random.h:39:1: Parameter `state->mt[*]`
  37. 
  38. /** generates a random number on [0,0xffffffff]-interval */
  39. static inline unsigned int av_random(AVRandomState *state)
      ^
  40. {
  41.     unsigned int y;

libavutil/random.h:48:5: Assignment
  46. 
  47.     // grab one...
  48.     y = state->mt[state->index++];
          ^
  49. 
  50.     /* Now temper (Mersenne Twister coefficients) The coefficients for MT19937 are.. */

libavutil/random.h:51:5: Assignment
  49. 
  50.     /* Now temper (Mersenne Twister coefficients) The coefficients for MT19937 are.. */
  51.     y ^= (y >> 11);
          ^
  52.     y ^= (y << 7) & 0x9d2c5680;
  53.     y ^= (y << 15) & 0xefc60000;

libavutil/random.h:52:5: Assignment
  50.     /* Now temper (Mersenne Twister coefficients) The coefficients for MT19937 are.. */
  51.     y ^= (y >> 11);
  52.     y ^= (y << 7) & 0x9d2c5680;
          ^
  53.     y ^= (y << 15) & 0xefc60000;
  54.     y ^= (y >> 18);

libavutil/random.h:53:5: Assignment
  51.     y ^= (y >> 11);
  52.     y ^= (y << 7) & 0x9d2c5680;
  53.     y ^= (y << 15) & 0xefc60000;
          ^
  54.     y ^= (y >> 18);
  55. 

libavutil/random.h:54:5: Assignment
  52.     y ^= (y << 7) & 0x9d2c5680;
  53.     y ^= (y << 15) & 0xefc60000;
  54.     y ^= (y >> 18);
          ^
  55. 
  56.     return y;

libavutil/random.h:56:5: Assignment
  54.     y ^= (y >> 18);
  55. 
  56.     return y;
          ^
  57. }
  58. 

libavcodec/mpc7.c:123:13: Binary operation: ([0, 1020] - 510):unsigned32
121.     case -1:
122.         for(i = 0; i < SAMPLES_PER_BAND; i++){
123.             *dst++ = (av_random(&c->rnd) & 0x3FC) - 510;
                 ^
124.         }
125.         break;

static inline void idx_to_quant(MPCContext *c, GetBitContext *gb, int idx, int *dst)
{
    int i, i1, t;
    switch(idx){
    case -1:
        for(i = 0; i < SAMPLES_PER_BAND; i++){
            *dst++ = (av_random(&c->rnd) & 0x3FC) - 510;
        }
        break;
    case 1:
        i1 = get_bits1(gb);
        for(i = 0; i < SAMPLES_PER_BAND/3; i++){
            t = get_vlc2(gb, quant_vlc[0][i1].table, 9, 2);
            *dst++ = mpc7_idx30[t];
            *dst++ = mpc7_idx31[t];
            *dst++ = mpc7_idx32[t];
        }
        break;
    case 2:
        i1 = get_bits1(gb);
        for(i = 0; i < SAMPLES_PER_BAND/2; i++){
            t = get_vlc2(gb, quant_vlc[1][i1].table, 9, 2);
            *dst++ = mpc7_idx50[t];
            *dst++ = mpc7_idx51[t];
        }
        break;
    case  3: case  4: case  5: case  6: case  7:
        i1 = get_bits1(gb);
        for(i = 0; i < SAMPLES_PER_BAND; i++)
            *dst++ = get_vlc2(gb, quant_vlc[idx-1][i1].table, 9, 2) - mpc7_quant_vlc_off[idx-1];
        break;
    case  8: case  9: case 10: case 11: case 12:
    case 13: case 14: case 15: case 16: case 17:
        t = (1 << (idx - 2)) - 1;
        for(i = 0; i < SAMPLES_PER_BAND; i++)
            *dst++ = get_bits(gb, idx - 1) - t;
        break;
    default:
        return;
    }
}
['static inline void idx_to_quant(MPCContext *c, GetBitContext *gb, int idx, int *dst)\n{\n    int i, i1, t;\n    switch(idx){\n    case -1:\n        for(i = 0; i < SAMPLES_PER_BAND; i++){\n            *dst++ = (av_random(&c->rnd) & 0x3FC) - 510;\n        }\n        break;\n    case 1:\n        i1 = get_bits1(gb);\n        for(i = 0; i < SAMPLES_PER_BAND/3; i++){\n            t = get_vlc2(gb, quant_vlc[0][i1].table, 9, 2);\n            *dst++ = mpc7_idx30[t];\n            *dst++ = mpc7_idx31[t];\n            *dst++ = mpc7_idx32[t];\n        }\n        break;\n    case 2:\n        i1 = get_bits1(gb);\n        for(i = 0; i < SAMPLES_PER_BAND/2; i++){\n            t = get_vlc2(gb, quant_vlc[1][i1].table, 9, 2);\n            *dst++ = mpc7_idx50[t];\n            *dst++ = mpc7_idx51[t];\n        }\n        break;\n    case  3: case  4: case  5: case  6: case  7:\n        i1 = get_bits1(gb);\n        for(i = 0; i < SAMPLES_PER_BAND; i++)\n            *dst++ = get_vlc2(gb, quant_vlc[idx-1][i1].table, 9, 2) - mpc7_quant_vlc_off[idx-1];\n        break;\n    case  8: case  9: case 10: case 11: case 12:\n    case 13: case 14: case 15: case 16: case 17:\n        t = (1 << (idx - 2)) - 1;\n        for(i = 0; i < SAMPLES_PER_BAND; i++)\n            *dst++ = get_bits(gb, idx - 1) - t;\n        break;\n    default:\n        return;\n    }\n}', 'static inline unsigned int av_random(AVRandomState *state)\n{\n    unsigned int y;\n    if (state->index >= AV_RANDOM_N)\n        av_random_generate_untempered_numbers(state);\n    y = state->mt[state->index++];\n    y ^= (y >> 11);\n    y ^= (y << 7) & 0x9d2c5680;\n    y ^= (y << 15) & 0xefc60000;\n    y ^= (y >> 18);\n    return y;\n}']