[rrd-developers] Re: Warnings at compile time

Tobias Oetiker oetiker at ee.ethz.ch
Tue Apr 2 07:34:34 MEST 2002


Today Alex van den Bogaerdt wrote:

> Tobias Oetiker wrote:
>
> > About the warnings, we get them because I have the most zealous,
> > warnings enabled in the makefiles ...
>
> Understood.  There seem to be different CFLAGS for zlib, perhaps
> we should use the original authors settings when compiling anything
> that is not rrdtool itself ?

well yes and now, using differnt warning levels would make the
erros disapear to an extend, but at least for the shadowed
variables they would remain, as they occure form including the
libart headers alone and we need the headers in rrdtool propper ..

> > How about sending the libart author a 'bug' report, afterall this
> > will not be an rrdtool specific problem ...
>
> Indeed, rrdtool itself also has this problem.  It turns out to be a
> function by the way, not a variable.  A small test program shows that
> I can indeed use the function "y1" but only if I link to the math library.
>
> tester.c:
> 	#include <stdio.h>
> 	#include <math.h>
>
> 	int main(void) {
>         	printf("%f\n",y1(1));
>         	return 0;
> 	}
>
> Makefile:
> 	CFLAGS = -lm
> 	all: tester
>
> program run:
> 	[alex at home tester]$ make
> 	cc -lm    tester.c   -o tester
> 	[alex at home tester]$ ./tester
> 	-0.781213
> 	[alex at home tester]$
>
> Best of course is to find a way to disable these functions.  I've
> tried and failed.  Perhaps someone else knows how to do this.

I don't think this can be done ... we should just use other names
for them ... maybe we could use a clever 'define' in the libart
headers, this would be a simple change ...

> I don't know what is second best.  IMHO warnings for shadowed
> variables are good, if they do not occur normally.

yep ... so we should remove the cause and not the symptom ... the
symptom does not hurt ... the cause may ...

> Before writing a note to the author of libart I need to we're not
> going to change CFLAGS for it.

I think we should not change the CFLAGS ... they point to potential
problems ...

cheers
tobi
>
> cheers,
>

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker, ETZ J97, ETH, 8092 Zurich, Switzerland
 / // _ \/ _ \/ / phoneto:+41(0)1-632-5286  faxto:+41(0)1-632-1517
/_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://google.com/search?q=tobi


--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-developers mailing list