Fix the warning during clang-analyze
This commit is contained in:
parent
b95b390f17
commit
8fc731e012
|
@ -229,7 +229,8 @@ static BOOL SDImageIOPNGPluginBuggyNeedWorkaround(void) {
|
||||||
NSCParameterAssert(source);
|
NSCParameterAssert(source);
|
||||||
CGImageRef cgImage = CGImageSourceCreateImageAtIndex(source, 0, nil);
|
CGImageRef cgImage = CGImageSourceCreateImageAtIndex(source, 0, nil);
|
||||||
NSCParameterAssert(cgImage);
|
NSCParameterAssert(cgImage);
|
||||||
uint8_t r, g, b, a = 0;
|
uint8_t r, g, b, a;
|
||||||
|
r = g = b = a = 0;
|
||||||
BOOL success = SDLoadOnePixelBitmapBuffer(cgImage, &r, &g, &b, &a);
|
BOOL success = SDLoadOnePixelBitmapBuffer(cgImage, &r, &g, &b, &a);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
isBuggy = NO; // Impossible...
|
isBuggy = NO; // Impossible...
|
||||||
|
@ -238,7 +239,7 @@ static BOOL SDImageIOPNGPluginBuggyNeedWorkaround(void) {
|
||||||
// Correct value
|
// Correct value
|
||||||
isBuggy = NO;
|
isBuggy = NO;
|
||||||
} else {
|
} else {
|
||||||
SD_LOG("Detected the current OS's ImageIO PNG Decoder is buggy on indexed color PNG. Perform workaround solution...");
|
SD_LOG("%@", @"Detected the current OS's ImageIO PNG Decoder is buggy on indexed color PNG. Perform workaround solution...");
|
||||||
isBuggy = YES;
|
isBuggy = YES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue