summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-12-26 17:46:04 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-12-26 17:46:04 +0800
commit36c134390f60ed96184dd3e3e7f6d28c2b5bbf5e (patch)
treeed2762e77057b325266f5413b4482d7b39a121c5 /include
parent86618fc1fff4cc2379bd65fe113e5586f34b4bc5 (diff)
downloadpttbbs-36c134390f60ed96184dd3e3e7f6d28c2b5bbf5e.tar
pttbbs-36c134390f60ed96184dd3e3e7f6d28c2b5bbf5e.tar.gz
pttbbs-36c134390f60ed96184dd3e3e7f6d28c2b5bbf5e.tar.bz2
pttbbs-36c134390f60ed96184dd3e3e7f6d28c2b5bbf5e.tar.lz
pttbbs-36c134390f60ed96184dd3e3e7f6d28c2b5bbf5e.tar.xz
pttbbs-36c134390f60ed96184dd3e3e7f6d28c2b5bbf5e.tar.zst
pttbbs-36c134390f60ed96184dd3e3e7f6d28c2b5bbf5e.zip
use gcc's extension to check format string
and make compiler happier git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@588 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include')
-rw-r--r--include/proto.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/proto.h b/include/proto.h
index 1c72178c..a340a943 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -1,7 +1,13 @@
-/* $Id: proto.h,v 1.30 2002/11/06 16:25:14 in2 Exp $ */
+/* $Id: proto.h,v 1.31 2002/12/26 09:46:03 kcwu Exp $ */
#ifndef INCLUDE_PROTO_H
#define INCLUDE_PROTO_H
+#ifdef __GNUC__
+#define GCC_CHECK_FORMAT(a,b) __attribute__ ((format (printf, a, b)))
+#else
+#define GCC_CHECK_FORMAT(a,b)
+#endif
+
/* admin */
int m_mod_board(char *bname);
int m_newbrd(int recover);
@@ -23,7 +29,7 @@ void gem(char* maintitle, item_t* path, int update);
/* args */
void initsetproctitle(int argc, char **argv, char **envp);
-void setproctitle(const char* format, ...);
+void setproctitle(const char* format, ...) GCC_CHECK_FORMAT(1,2);
/* bbcall */
int main_bbcall();
@@ -348,7 +354,7 @@ void UnTagger (int locus);
int substitute_record(char *fpath, void *rptr, int size, int id);
int lock_substitute_record(char *fpath, void *rptr, int size, int id, int);
int get_record(char *fpath, void *rptr, int size, int id);
-void prints(char *fmt, ...);
+void prints(char *fmt, ...) GCC_CHECK_FORMAT(1,2);
int append_record(char *fpath, fileheader_t *record, int size);
int stampfile(char *fpath, fileheader_t *fh);
void stampdir(char *fpath, fileheader_t *fh);
@@ -400,7 +406,7 @@ time_t gettime(int line, time_t dt);
void setcalfile(char *buf, char *userid);
void stand_title(char *title);
void pressanykey();
-int vmsg (const char *fmt,...);
+int vmsg (const char *fmt,...) GCC_CHECK_FORMAT(1,2);
void trim(char *buf);
void bell();
void setbpath(char *buf, char *boardname);