pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #6343: PGTYPES library missing qualifiers
2+ messages / 2 participants
[nested] [flat]

* BUG #6343: PGTYPES library missing qualifiers
@ 2011-12-16 15:33  kojiro@hello-channel.com
  0 siblings, 1 reply; 2+ messages in thread

From: kojiro@hello-channel.com @ 2011-12-16 15:33 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      6343
Logged by:          Daniel Loffgren
Email address:      kojiro@hello-channel.com
PostgreSQL version: 9.1.1
Operating system:   NetBSD
Description:        

In the ecpg PGTYPES library, there are functions like this: 

extern int PGTYPEStimestamp_fmt_asc(timestamp *, char *, int, char *);

The last argument is the formatting string, yet isn't constant. This
generates warnings/errors on many compilers that are watching for discarding
of qualifiers when passing in string literals. It's a simple fix, although I
noticed that in PGTYPEStimestamp_defmt_asc the code is altering the
formatter if it is null, which prevents making the formatter const. However,
dttofmtasc_replace does not alter the formatter, and so should not pose a
problem for PGTYPEStimestamp_fmt_asc which passes straight to it.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #6343: PGTYPES library missing qualifiers
@ 2011-12-18 18:05  Michael Meskes <meskes@postgresql.org>
  parent: kojiro@hello-channel.com
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Meskes @ 2011-12-18 18:05 UTC (permalink / raw)
  To: kojiro@hello-channel.com; +Cc: pgsql-bugs

On Fri, Dec 16, 2011 at 03:33:18PM +0000, kojiro@hello-channel.com wrote:
> The last argument is the formatting string, yet isn't constant. This
> generates warnings/errors on many compilers that are watching for discarding
> of qualifiers when passing in string literals. It's a simple fix, although I
> ...

Changed in our master branch. Thanks for bringing this up.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at googlemail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2011-12-18 18:05 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-12-16 15:33 BUG #6343: PGTYPES library missing qualifiers kojiro@hello-channel.com
2011-12-18 18:05 ` Michael Meskes <meskes@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox