BUG #2606: (libpq) incorrect function declaration in libpq-fe.h

Started by Marc ROGLIANOover 19 years ago2 messagesbugs
Jump to latest
#1Marc ROGLIANO
marc@rogliano.net

The following bug has been logged online:

Bug reference: 2606
Logged by: Marc ROGLIANO
Email address: marc@rogliano.net
PostgreSQL version: 8.1.4
Operating system: Windows XP
Description: (libpq) incorrect function declaration in libpq-fe.h
Details:

Hello,

In libpq-fe.h, the function lo_write is declared :

extern int lo_write(PGconn *conn, int fd, char *buf, size_t len);
=> 'const' missing before char *buf : buf should not be writable here

Best regards,
Marc

#2Bruce Momjian
bruce@momjian.us
In reply to: Marc ROGLIANO (#1)
Re: BUG #2606: (libpq) incorrect function declaration

Marc ROGLIANO wrote:

The following bug has been logged online:

Bug reference: 2606
Logged by: Marc ROGLIANO
Email address: marc@rogliano.net
PostgreSQL version: 8.1.4
Operating system: Windows XP
Description: (libpq) incorrect function declaration in libpq-fe.h
Details:

Hello,

In libpq-fe.h, the function lo_write is declared :

extern int lo_write(PGconn *conn, int fd, char *buf, size_t len);
=> 'const' missing before char *buf : buf should not be writable here

Right, patch attached and applied. Interestingly, it was documented as
taking a 'const' there, but not implemented as const in the code.

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachments:

/bjm/difftext/x-diffDownload+12-12