summaryrefslogtreecommitdiff
path: root/src/apk_print.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/apk_print.h')
-rw-r--r--src/apk_print.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/apk_print.h b/src/apk_print.h
index 8e4dd46..1d5dfd6 100644
--- a/src/apk_print.h
+++ b/src/apk_print.h
@@ -22,7 +22,7 @@ struct apk_url_print {
void apk_url_parse(struct apk_url_print *, const char *);
#define URL_FMT "%.*s%s%s"
-#define URL_PRINTF(u) u.len_before_pw, u.url, u.pwmask, u.url_or_host
+#define URL_PRINTF(u) (int)u.len_before_pw, u.url, u.pwmask, u.url_or_host
#define apk_error(args...) do { apk_log_err("ERROR: ", args); } while (0)
#define apk_warning(args...) do { if (apk_verbosity > 0) { apk_log_err("WARNING: ", args); } } while (0)
@@ -30,8 +30,10 @@ void apk_url_parse(struct apk_url_print *, const char *);
extern int apk_progress_fd;
-void apk_log(const char *prefix, const char *format, ...);
-void apk_log_err(const char *prefix, const char *format, ...);
+void apk_log(const char *prefix, const char *format, ...)
+ __attribute__ ((format (printf, 2, 3)));
+void apk_log_err(const char *prefix, const char *format, ...)
+ __attribute__ ((format (printf, 2, 3)));
const char *apk_error_str(int error);
void apk_reset_screen_width(void);
@@ -46,6 +48,7 @@ struct apk_indent {
void apk_print_progress(size_t done, size_t total);
int apk_print_indented(struct apk_indent *i, apk_blob_t blob);
void apk_print_indented_words(struct apk_indent *i, const char *text);
-void apk_print_indented_fmt(struct apk_indent *i, const char *fmt, ...);
+void apk_print_indented_fmt(struct apk_indent *i, const char *fmt, ...)
+ __attribute__ ((format (printf, 2, 3)));
#endif