Hi Joris,
On Mon, May 27, 2013 at 07:17:28PM +0200, joris dedieu wrote:
So maybe we can find some expect unused attributes for the functions
and macros, or maybe we can disable those stupid checks in the compiler's
cflags.
So what about a conditional directive in the Makefile ? Something like
diff --git a/Makefile b/Makefile
index 5e12af8..89ca6a4 100644
--- a/Makefile
+++ b/Makefile
@@ -154,6 +154,10 @@ ADDLIB =
DEFINE =
SILENT_DEFINE =
+ Compilers stupid warnings
+# Sometimes compilers emit warnings that don't need a fix. Mute them.
+COMPILER_CRAPS.clang = -Wno-unused-value
+COMPILER_CRAPS = $(COMPILER_CRAPS.$(CC))
(...)
Could be one solution indeed. That way people who want to force it on
their other compiler when using cross-compilers would simply just have
to force COMPILER_CRAPS instead.
When I have some time for this, I'll add some automatic detection of
supported -W* flags to disable these things in a portable way.
Anyway, I'm really tired at fighting with this compilers!
So if you can find portable solutions which disable those annoying
stupid warnings, I'm all ears open !
I know one unfortunately , but it's called autoconf :(
And it will be even worse, because instead of just figuring what variable
in the makefile would need to be adapted, users will have to fight for
hours or days to work around the autoconf mess.
Best regards,
Willy