Comments (3)
Thank you for looking at this. I am impressed with your command :-)
I happened to go through this list a few days ago. With one notable exception these are not problematic. The unused variables are behind preprocessor walls, so the compiler doesn't see their use. The set but unused variables are mostly there to avoid other warnings about ignoring returned data; many of these variables are called "ignore". The 2 unused functions have been used in the past and can be used for debugging or making some data if necessary.
The misleading indentation is a bug I introduced (an extra ';') while fixing stuff yesterday (!)
It's in a unit (partify) that is not working properly yet, so this isn't important.
Finally, the use after free is an error in gplot.c. It's in a section of code that is only invoked if there is an error opening a stream, which would be very rare. This will be fixed in a day or two.
from leptonica.
Even more warnings are produced with clang and compiler option -Weverything
:
18 [-Waddress-of-packed-member]
96 [-Watomic-implicit-seq-cst]
39 [-Wbad-function-cast]
11 [-Wcast-align]
31 [-Wcast-qual]
3 [-Wcomma]
189 [-Wconditional-uninitialized]
3 [-Wdeclaration-after-statement]
18 [-Wdisabled-macro-expansion]
5 [-Wdocumentation-html]
4 [-Wdocumentation-unknown-command]
1887 [-Wdocumentation]
2118 [-Wdouble-promotion]
1 [-Wempty-translation-unit]
158 [-Wfloat-conversion]
35 [-Wfloat-equal]
4 [-Wformat-nonliteral]
5 [-Wformat-pedantic]
1008 [-Wimplicit-float-conversion]
554 [-Wimplicit-int-conversion]
1 [-Wliteral-conversion]
1 [-Wliteral-range]
2 [-Wmissing-noreturn]
2 [-Wmissing-prototypes]
30 [-Wmissing-variable-declarations]
11 [-Woverlength-strings]
46 [-Wpadded]
11 [-Wshadow]
1 [-Wshift-sign-overflow]
165 [-Wshorten-64-to-32]
171 [-Wsign-compare]
1080 [-Wsign-conversion]
7 [-Wstrict-prototypes]
1 [-Wunaligned-access]
13 [-Wundef]
9 [-Wunreachable-code-break]
1 [-Wunreachable-code-return]
8 [-Wunreachable-code]
25 [-Wunused-but-set-variable]
1 [-Wunused-const-variable]
2 [-Wunused-function]
33 [-Wunused-macros]
127 [-Wunused-parameter]
15 [-Wunused-variable]
Some of them are worth being fixed, for example unnecessary conversions between float
and double
which cost a little bit of performance.
from leptonica.
That list looks like a warning not to get out of bed in the morning because 1000 bad things could happen. Or even worse, you might waste a year of your life chasing down compiler warnings ;-)
Never thought about overhead from float to double conversion. I have used float wherever possible because it saves storage and it used to be faster. So only used double if the precision was necessary (e.g., representing 32 bit integers, transforms near singularities, hashing functions, etc).
from leptonica.
Related Issues (20)
- Suggest noting that libtiff must have been compiled with JPEG compression support for tests to run correctly HOT 4
- Leptonica 1.84 release schedule HOT 28
- How to detect the four corners of paper or ID card HOT 8
- 1.84.0 fails to build in FreeBSD 14.0 due missing reference to libm using CMake HOT 24
- CMake build in 1.84.0 adds include to non-existant path
- pixWriteJp2k: unexpected strong color artifacts on featureless image HOT 7
- pixOrientDetect with .bmp file HOT 6
- Logic error in pixcmapIsValid() HOT 5
- Regression: file not found on MacOS when opening /tmp file HOT 2
- Identifying and removing asterisks HOT 8
- pixDeskewGeneral(...) failing to detect a 45 degree skew? HOT 2
- Application crashing while disposing Pix.Create object HOT 5
- get minarea-rotated box of a skew area HOT 2
- pixRead() can't read png images HOT 5
- Crash when access Pix colormap on debug HOT 6
- Installing leptonica on Windows failed with reason prompt 'SW' not found HOT 2
- Errors building Leptonica for use with Tesseract HOT 2
- getImpliedFileFormat / pixWriteImpliedFormat and PNM issues HOT 2
- pixOrientCorrect/pixOrientDetect issue with PBM HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leptonica.