Browse code

try to check coding styles for output functions

git-svn: trunk@2693

Tomasz Kojm authored on 2007/02/10 22:44:16
Showing 3 changed files
... ...
@@ -1,3 +1,8 @@
1
+Sat Feb 10 14:38:20 CET 2007 (tk)
2
+---------------------------------
3
+  * libclamav/others.h, shared/output.h: try to check coding styles for output
4
+					 functions, thanks to NJH
5
+
1 6
 Sat Feb 10 11:22:16 GMT 2007 (njh)
2 7
 ----------------------------------
3 8
   * libclamav/pdf.c:	Fix warning on 64bit machines
... ...
@@ -137,9 +137,24 @@ typedef struct bitset_tag
137 137
         unsigned long length;
138 138
 } bitset_t;
139 139
 
140
+#ifdef __GNUC__
141
+void cli_warnmsg(const char *str, ...) __attribute__((format(printf, 1, 2)));
142
+#else
140 143
 void cli_warnmsg(const char *str, ...);
144
+#endif
145
+
146
+#ifdef __GNUC__
147
+void cli_errmsg(const char *str, ...) __attribute__((format(printf, 1, 2)));
148
+#else
141 149
 void cli_errmsg(const char *str, ...);
150
+#endif
151
+
152
+#ifdef __GNUC__
153
+void cli_dbgmsg(const char *str, ...) __attribute__((format(printf, 1, 2)));
154
+#else
142 155
 void cli_dbgmsg(const char *str, ...);
156
+#endif
157
+
143 158
 void *cli_malloc(size_t nmemb);
144 159
 void *cli_calloc(size_t nmemb, size_t size);
145 160
 void *cli_realloc(void *ptr, size_t size);
... ...
@@ -29,7 +29,12 @@
29 29
 
30 30
 int mdprintf(int desc, const char *str, ...);
31 31
 
32
+#ifdef __GNUC__
33
+int logg(const char *str, ...)      __attribute__((format(printf, 1, 2)));
34
+#else
32 35
 int logg(const char *str, ...);
36
+#endif
37
+
33 38
 void logg_close(void);
34 39
 extern short int logg_verbose, logg_lock, logg_time;
35 40
 extern int logg_size;
... ...
@@ -40,7 +45,12 @@ extern short logg_syslog;
40 40
 int logg_facility(const char *name);
41 41
 #endif
42 42
 
43
+#ifdef __GNUC__
44
+void mprintf(const char *str, ...) __attribute__((format(printf, 1, 2)));
45
+#else
43 46
 void mprintf(const char *str, ...);
47
+#endif
48
+
44 49
 extern short int mprintf_disabled, mprintf_verbose, mprintf_quiet, mprintf_stdout;
45 50
 
46 51
 #endif