mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Clean up ecpg's use of mmerror(): const-ify the format argument, add an
__attribute__() marker so that gcc can validate the format string against the actual arguments, get rid of overcomplicated and unsafe usage in base_yyerror().
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/extern.h,v 1.71 2008/05/20 23:17:32 meskes Exp $ */
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/extern.h,v 1.72 2009/06/03 20:24:51 tgl Exp $ */
|
||||
|
||||
#ifndef _ECPG_PREPROC_EXTERN_H
|
||||
#define _ECPG_PREPROC_EXTERN_H
|
||||
@ -74,7 +74,9 @@ extern int base_yylex(void);
|
||||
extern void base_yyerror(const char *);
|
||||
extern void *mm_alloc(size_t), *mm_realloc(void *, size_t);
|
||||
extern char *mm_strdup(const char *);
|
||||
extern void mmerror(int, enum errortype, char *,...);
|
||||
extern void mmerror(int, enum errortype, const char *, ...)
|
||||
/* This extension allows gcc to check the format string */
|
||||
__attribute__((format(printf, 3, 4)));
|
||||
extern void output_get_descr_header(char *);
|
||||
extern void output_get_descr(char *, char *);
|
||||
extern void output_set_descr_header(char *);
|
||||
|
Reference in New Issue
Block a user