Static analysis fix: "Value stored to 'p' is never read"
authorRyan C. Gordon <icculus@icculus.org>
Wed, 19 Mar 2014 16:52:26 -0400
changeset 8641 c576c104923b
parent 8640 89bab8249c74
child 8642 3506de54b829
Static analysis fix: "Value stored to 'p' is never read"
src/video/SDL_fillrect.c
--- a/src/video/SDL_fillrect.c	Wed Mar 19 16:02:25 2014 -0400
+++ b/src/video/SDL_fillrect.c	Wed Mar 19 16:52:26 2014 -0400
@@ -99,12 +99,11 @@
 SDL_FillRect1SSE(Uint8 *pixels, int pitch, Uint32 color, int w, int h)
 {
     int i, n;
-    Uint8 *p = NULL;
-    
+
     SSE_BEGIN;
     while (h--) {
+        Uint8 *p = pixels;
         n = w;
-        p = pixels;
 
         if (n > 63) {
             int adjust = 16 - ((uintptr_t)p & 15);
@@ -118,7 +117,6 @@
         if (n & 63) {
             int remainder = (n & 63);
             SDL_memset(p, color, remainder);
-            p += remainder;
         }
         pixels += pitch;
     }