gali8 / Tesseract-OCR-iOS

Tesseract OCR iOS is a Framework for iOS7+, compiled also for armv7s and arm64.
http://www.nexor.it
MIT License
4.22k stars 949 forks source link

Analyser warning - Result of 'malloc' is converted to a pointer of type 'const char *' #136

Closed gustafnilklint closed 9 years ago

gustafnilklint commented 9 years ago

G8Tesseract.mm:166:43: Result of 'malloc' is converted to a pointer of type 'const char *', which is incompatible with sizeof operand type 'int'

const char _configs = (const char _)malloc(sizeof(int) * count);

should probably be changed to:

const char _configs = (const char _)malloc(sizeof(const char) \ count);

ws233 commented 9 years ago

It seems you're right. But I don't have this warning. Could you propose more details how I can reproduce this? Which framework and xcode version do you use, which target?

ws233 commented 9 years ago

Ah. I see. That's an analizer warning. I'll fix this. Thank a lot for your contribution, @gustafnilklint!

ws233 commented 9 years ago

There is a PR with the changes you siggests #137.