StackBluriOS icon indicating copy to clipboard operation
StackBluriOS copied to clipboard

Assigned value is garbage or undefined in UIImage+StackBlur

Open ghost opened this issue 11 years ago • 2 comments

Has anyone noticed following warnings while Analysing code? I have tried fixing by initialising values for rsum or dv but not able to resolve them. Has anyone fixed them?

...StackBlur/UIImage+StackBlur.m:155:4: Assigned value is garbage or undefined ...StackBlur/UIImage+StackBlur.m:244:4: Assigned value is garbage or undefined

Thanks.

ghost avatar Jun 06 '13 15:06 ghost

Hi, to fix this just add an assert to tell the compiler that dvcount cannot be zero: const size_t dvcount = 256 * divsum; assert(dvcount>0); int *dv = malloc(sizeof(int) * dvcount);

PrinceCreed avatar Jun 14 '13 18:06 PrinceCreed

For 155:4 warning I found these answer http://stackoverflow.com/questions/16928381/cfmutabledataref-released-but-still-causing-a-memory-leak I hope it helps.

SergeyCHiP avatar Aug 27 '14 12:08 SergeyCHiP