Skip site navigation (1) Skip section navigation (2)

BUG #6343: PGTYPES library missing qualifiers

From: kojiro(at)hello-channel(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6343: PGTYPES library missing qualifiers
Date: 2011-12-16 15:33:18
Message-ID: E1RbZmg-0007KG-4v@wrigleys.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged on the website:

Bug reference:      6343
Logged by:          Daniel Loffgren
Email address:      kojiro(at)hello-channel(dot)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.


Responses

pgsql-bugs by date

Next:From: Pavel HolecDate: 2011-12-16 16:39:46
Subject: Re: user names & non-ASCII
Previous:From: Andrea GrassiDate: 2011-12-16 14:10:47
Subject: R: BUG #6342: libpq blocks forever in "poll" function

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group