Static analysis fix: "Value stored to 'p' is never read"
authorRyan C. Gordon
Wed, 19 Mar 2014 16:52:26 -0400
changeset 8641c576c104923b
parent 8640 89bab8249c74
child 8642 3506de54b829
Static analysis fix: "Value stored to 'p' is never read"
src/video/SDL_fillrect.c
     1.1 --- a/src/video/SDL_fillrect.c	Wed Mar 19 16:02:25 2014 -0400
     1.2 +++ b/src/video/SDL_fillrect.c	Wed Mar 19 16:52:26 2014 -0400
     1.3 @@ -99,12 +99,11 @@
     1.4  SDL_FillRect1SSE(Uint8 *pixels, int pitch, Uint32 color, int w, int h)
     1.5  {
     1.6      int i, n;
     1.7 -    Uint8 *p = NULL;
     1.8 -    
     1.9 +
    1.10      SSE_BEGIN;
    1.11      while (h--) {
    1.12 +        Uint8 *p = pixels;
    1.13          n = w;
    1.14 -        p = pixels;
    1.15  
    1.16          if (n > 63) {
    1.17              int adjust = 16 - ((uintptr_t)p & 15);
    1.18 @@ -118,7 +117,6 @@
    1.19          if (n & 63) {
    1.20              int remainder = (n & 63);
    1.21              SDL_memset(p, color, remainder);
    1.22 -            p += remainder;
    1.23          }
    1.24          pixels += pitch;
    1.25      }