Prechádzať zdrojové kódy

Static analysis fix: "Value stored to 'p' is never read"

Ryan C. Gordon 11 rokov pred
rodič
commit
faaaf6c572
1 zmenil súbory, kde vykonal 2 pridanie a 4 odobranie
  1. 2 4
      src/video/SDL_fillrect.c

+ 2 - 4
src/video/SDL_fillrect.c

@@ -99,12 +99,11 @@ static void
 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 @@ SDL_FillRect1SSE(Uint8 *pixels, int pitch, Uint32 color, int w, int h)
         if (n & 63) {
             int remainder = (n & 63);
             SDL_memset(p, color, remainder);
-            p += remainder;
         }
         pixels += pitch;
     }