tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] tiny bit of lint


From: Michael Matz
Subject: Re: [Tinycc-devel] tiny bit of lint
Date: Mon, 8 May 2017 05:40:38 +0200 (CEST)
User-agent: Alpine 2.20 (LSU 67 2015-01-07)

Hi,

On Sun, 7 May 2017, Larry Doolittle wrote:

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.

Some of those are public lib functions, where the parameter that's right now unused could conceivably be used in the future, so there it'd be appropriate to silence the warning.

Some of them are internal and it's probably better if the unused parameter simply be removed. Some of them are functions with multiple implementations in different backends, where some do and others don't use the parameter, so there again it would have to be silenced.

If the silencing really should happen (e.g. by void casting, as you say) I have no big opinion on. I'd like to look at the possible cleanup for internal functions first, though.

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.

Just fixed in mob. This warning is borderline useless IMHO, but silencing it didn't require uglification, so I've done it.

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.

IMO: push to mob.


Ciao,
Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]