Tagged error and warning with GCC attributes.

This commit is contained in:
Camilla Berglund
2012-01-19 16:19:18 +01:00
parent 2bf03601d1
commit a64cfdbfc0
2 changed files with 9 additions and 2 deletions
+2
View File
@@ -5,6 +5,8 @@ Maintained since version 0.3.1.
2012-01-19 Camilla Berglund <elmindreda@elmindreda.org>
* duff.h: Tagged functions error and warning with GCC attributes.
* duff.1: Clarified default sampling limit.
* duffdriver.c: Renamed cluster index variable to index.
2012-01-18 Camilla Berglund <elmindreda@elmindreda.org>
+7 -2
View File
@@ -28,6 +28,11 @@
*/
#define _(String) gettext(String)
/* Only use __attribute__ on GCC and compatible compilers */
#ifndef __GNUC__
#define __attribute__(x)
#endif
#define SAMPLE_COUNT 10
/* Status modes for entries.
@@ -114,8 +119,8 @@ int compare_entries(Entry* first, Entry* second);
int read_path(FILE* stream, char* path, size_t size);
void kill_trailing_slashes(char* path);
size_t get_digest_size(void);
void error(const char* format, ...);
void warning(const char* format, ...);
void error(const char* format, ...) __attribute__((format(printf, 1, 2))) __attribute__((noreturn));
void warning(const char* format, ...) __attribute__((format(printf, 1, 2)));
int cluster_header_uses_digest(const char* format);
void print_cluster_header(const char* format,
unsigned int count,