[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] tiny bit of lint
From: |
Christian Jullien |
Subject: |
Re: [Tinycc-devel] tiny bit of lint |
Date: |
Mon, 8 May 2017 07:47:40 +0200 |
Hi Larry,
I share this hobby with you but only with my own projects.
If you like to chase warnings in C, I invite you to forget those 'chicken'
checks and to move to something stronger such as (from easier to stronger):
* clang and --analyze
* VC++ -analyse
* smatch that helped to find ~3000 Linux kernel bugs
* splint which is my favorite and much more parano that you can imagine in
your dreams (or nightmares) => http://www.splint.org/
splint helped me to find real bugs hard to catch. Using splint is a sport.
It makes you feel you are a C noob.
I never use splint on projects that I don't own .. unless I'm ready to stop
using them :o))
-----Original Message-----
From: Tinycc-devel [mailto:address@hidden
On Behalf Of Larry Doolittle
Sent: lundi 8 mai 2017 05:13
To: address@hidden
Subject: [Tinycc-devel] tiny bit of lint
Esteemed tinycc maintainers -
One of my hobbies is turning up the C compiler warning level in projects I'm
interested in, and seeing what lint shows up. Tinycc is really pretty
clean.
Using gcc's -Wextra, I found 17 "unused parameter", which could be addressed
by bloating the source code a bit (casting to void), and with no consequence
on the binary. If anyone else thought that would be an improvement, I'd be
happy to write and submit a patch.
Using gcc's -Wextra, I found 23 "missing initializer for field", all
generated by macros in x86_64-asm.h. I would not be able to test any
attempt to improve that situation, so I'll leave it alone.
Using gcc's -Wwrite-strings, I found one simple lack-of-const in tcctools.c,
patch attached. The patch has zero effect on the code's functionality.
That patch also adds "undef strict-prototypes write-strings" to the list of
warning flags that will be used if present.
I'm a fan of using the writer/editor paradigm, so I won't actually commit
this to mob myself. I encourage someone in-tune with community values to
put on their editor's hat, double-check that my patch makes sense and
doesn't break anything, and then commit it or suggest changes.
- Larry
- Re: [Tinycc-devel] tiny bit of lint, (continued)
- Re: [Tinycc-devel] tiny bit of lint, Christian Jullien, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, Larry Doolittle, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, Christian Jullien, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, grischka, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, Christian Jullien, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, Larry Doolittle, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, grischka, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, Christian Jullien, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, Larry Doolittle, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, grischka, 2017/05/09
Re: [Tinycc-devel] tiny bit of lint,
Christian Jullien <=