Use __attribute__ ((format (printf, 2, 3))) to help compiler to identify format strings

This commit is contained in:
jsteube
2016-10-31 09:19:37 +01:00
parent a599b06a53
commit 3442892fda
9 changed files with 29 additions and 28 deletions
+6 -6
View File
@@ -14,13 +14,13 @@ void event_call (const u32 id, hashcat_ctx_t *hashcat_ctx, const void *buf, cons
#define EVENT(id) event_call ((id), hashcat_ctx, NULL, 0)
#define EVENT_DATA(id,buf,len) event_call ((id), hashcat_ctx, (buf), (len))
size_t event_log_info_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
size_t event_log_warning_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
size_t event_log_error_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
size_t event_log_info_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
size_t event_log_warning_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
size_t event_log_error_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
size_t event_log_info (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
size_t event_log_warning (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
size_t event_log_error (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
size_t event_log_info (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
size_t event_log_warning (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
size_t event_log_error (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
int event_ctx_init (hashcat_ctx_t *hashcat_ctx);
void event_ctx_destroy (hashcat_ctx_t *hashcat_ctx);
+1 -1
View File
@@ -36,7 +36,7 @@
void logfile_generate_topid (hashcat_ctx_t *hashcat_ctx);
void logfile_generate_subid (hashcat_ctx_t *hashcat_ctx);
void logfile_append (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
void logfile_append (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
int logfile_init (hashcat_ctx_t *hashcat_ctx);
void logfile_destroy (hashcat_ctx_t *hashcat_ctx);