siriz / leptonica

Automatically exported from code.google.com/p/leptonica
0 stars 0 forks source link

XCode semantic issues when building Leptonica #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build Leptonica-1.69 with Xcode

What is the expected output? A clean build without warnings.
What do you see instead? Several warnings (see below)

What version of the product are you using? On what operating system?
Leptonica-1.69, Mac OS 10.7.5 on x86_64, XCode development IDE

Please provide any additional information below.

I'm getting several semantic issues when building Leptonica-1.69 with XCode 
(Apple's development IDE). I try to summarize those below:

leptonica/src/pix2.c:686:17: warning: comparison of unsigned expression "val < 
0" is always false (val has been declared as l_uint32)

leptonica/src/pix2.c:701:13: warning: comparison of unsigned expression "val < 
0" is always false

leptonica/src/pix2.c:890:17: warning: comparison of unsigned expression "val < 
0" is always false

leptonica/src/pix2.c:904:13: warning: comparison of unsigned expression "val < 
0" is always false

leptonica/src/graphics.c:1746:1: warning: control may reach end of non-void 
function (missing return statement in fpixAutoRenderContours)

leptonica/src/numabasic.c:1960:13: warning: comparison of unsigned expression 
"key < 0" is always false

leptonica/src/textops.c:117:13: warning: comparison of unsigned expression "val 
< 0" is always false

leptonica/src/textops.c:274:13: warning: comparison of unsigned expression "val 
< 0" is always false

leptonica/src/textops.c:387:13: warning: comparison of unsigned expression "val 
< 0" is always false

leptonica/src/pixcomp.c:1466:52: warning: variable 'offset' is uninitialized 
when used here (uninitialized variable in pixacompWriteStream)

Original issue reported on code.google.com by maximums...@googlemail.com on 19 Dec 2012 at 11:34

GoogleCodeExporter commented 9 years ago
Thanks.  The negative value tests for unsigned ints should not be there, of 
course.  The error in graphics.c can cause an error in the returned ptr 
(depending on the compiler).  The error in pixcomp.c loses the offset value in 
the pixacomp.

All these will be fixed in 1.70.

Original comment by dan.bloo...@gmail.com on 20 Dec 2012 at 1:06

GoogleCodeExporter commented 9 years ago
Could you provide me with a quick patch fixing these issues?
I'm about to release the Macintosh version of our optical music recognition 
software (Audiveris) that uses both Tesseract and Leptonica for the OCR task. 
For that purpose, both Leptonica and Tesseract will be compiled as native OSX 
components.

I don't know how long I should wait for 1.70 release...

Thanks in advance!
Maxim

Original comment by maximums...@googlemail.com on 20 Dec 2012 at 2:43

GoogleCodeExporter commented 9 years ago
That's difficult because the files have changed significantly since 1.69, 
including new functions.  I can provide you with a 'beta' 1.70 that you can 
include with your Audiveris distribution, by 23 December, if that helps.

Original comment by dan.bloo...@gmail.com on 20 Dec 2012 at 5:28

GoogleCodeExporter commented 9 years ago
Thank you very much!

Please take your time to make all necessary changes. We're not in a hurry!

Thank you for your great work on Leptonica!
Best regards
Maxim

Original comment by maximums...@googlemail.com on 20 Dec 2012 at 10:23

GoogleCodeExporter commented 9 years ago
the beta 1.70 is ready.  I'll email it to you -- what's your address?

  dan.bloomberg@gmail.com

Original comment by dan.bloo...@gmail.com on 31 Dec 2012 at 9:32

GoogleCodeExporter commented 9 years ago
maximumspatium (et) gmail.com

Thank you very much!
Best regards
Maxim

Original comment by maximums...@googlemail.com on 2 Jan 2013 at 3:26

GoogleCodeExporter commented 9 years ago
1.70 is out (finally!).  YOu can get it at leptonica.org/download.html

Original comment by dan.bloo...@gmail.com on 23 Jan 2014 at 8:46