StackBluriOS
StackBluriOS copied to clipboard
Assigned value is garbage or undefined in UIImage+StackBlur
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.
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);
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.