Re: DTrace compiler warnings

Lists: pgsql-hackers
From: Bernd Helmle <mailings(at)oopsware(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: DTrace compiler warnings
Date: 2009-11-14 13:54:00
Message-ID: 38D06FCCB225BA1C6699D4E7@amenophis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I'm just seeing these kind of compiler warnings in current HEAD:

pgstat.c: In function ‘pgstat_report_activity’:
pgstat.c:2276: warning: passing argument 1 of
‘__dtrace_probe$postgresql$statement__status$v1$63686172202a’ discards
qualifiers from pointer target type

There are more of them (e.g. postgres.c), all passing a const char pointer.

Platform is Snow Leopard, 10.6.2, gcc 4.2.1

--
Thanks

Bernd


From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Bernd Helmle <mailings(at)oopsware(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org, Robert(dot)Lor(at)Sun(dot)COM
Subject: Re: DTrace compiler warnings
Date: 2009-11-14 14:25:25
Message-ID: 1258208725.1456.27.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hmm, const is also problem on solaris. dtrace generates probe.h file and
eats const. It generates following noise on solaris build:

"postgres.c", line 554: warning: argument #1 is incompatible with
prototype:
prototype: pointer to char : "../../../src/include/utils/probes.h",
line 582
argument : pointer to const char

IIRC, it was discussed. I cc Robert. He should know answer why const is
ignored.

Zdenek

Bernd Helmle píše v so 14. 11. 2009 v 14:54 +0100:
> I'm just seeing these kind of compiler warnings in current HEAD:
>
> pgstat.c: In function ‘pgstat_report_activity’:
> pgstat.c:2276: warning: passing argument 1 of
> ‘__dtrace_probe$postgresql$statement__status$v1$63686172202a’ discards
> qualifiers from pointer target type
>
> There are more of them (e.g. postgres.c), all passing a const char pointer.
>
> Platform is Snow Leopard, 10.6.2, gcc 4.2.1
>
> --
> Thanks
>
> Bernd
>


From: Bernd Helmle <mailings(at)oopsware(dot)de>
To: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
Cc: pgsql-hackers(at)postgresql(dot)org, Robert(dot)Lor(at)Sun(dot)COM
Subject: Re: DTrace compiler warnings
Date: 2009-12-07 23:39:09
Message-ID: 2DB53F4D3212B64438E57E9E@amenophis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

--On 14. November 2009 15:25:25 +0100 Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
wrote:

> Hmm, const is also problem on solaris. dtrace generates probe.h file and
> eats const. It generates following noise on solaris build:
>
> "postgres.c", line 554: warning: argument #1 is incompatible with
> prototype:
> prototype: pointer to char : "../../../src/include/utils/probes.h",
> line 582
> argument : pointer to const char
>
> IIRC, it was discussed. I cc Robert. He should know answer why const is
> ignored.

Have you dug into this further?

--
Thanks

Bernd