diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/krb5_helper.c | 2 | ||||
-rw-r--r-- | src/ldap_helper.c | 2 | ||||
-rw-r--r-- | src/log.c | 2 | ||||
-rw-r--r-- | src/log.h | 4 | ||||
-rw-r--r-- | src/str.h | 3 |
5 files changed, 8 insertions, 5 deletions
diff --git a/src/krb5_helper.c b/src/krb5_helper.c index c69a947..a52b412 100644 --- a/src/krb5_helper.c +++ b/src/krb5_helper.c @@ -137,7 +137,7 @@ get_krb5_tgt(isc_mem_t *mctx, const char *principal, const char *keyfile) krberr = krb5_cc_resolve(context, str_buf(ccname), &ccache); CHECK_KRB5(context, krberr, - "Failed to resolve ccache name %s", ccname); + "Failed to resolve ccache name %s", str_buf(ccname)); /* get krb5_principal from string */ krberr = krb5_parse_name(context, principal, &kprincpw); diff --git a/src/ldap_helper.c b/src/ldap_helper.c index aa5af2d..432efcd 100644 --- a/src/ldap_helper.c +++ b/src/ldap_helper.c @@ -1524,7 +1524,7 @@ ldap_sasl_interact(LDAP *ld, unsigned flags, void *defaults, void *sin) in->len = 0; ret = LDAP_OTHER; } - log_error("result: %s", in->result?in->result:""); + log_error("result: %s", (char *)(in->result?in->result:"")); } return ret; @@ -19,6 +19,8 @@ #include <stdio.h> +#include <isc/formatcheck.h> + #include <dns/log.h> #include "log.h" @@ -42,7 +42,7 @@ log_func_va("exiting with %s", isc_result_totext(res)) /* Basic logging functions */ -void log_debug(int level, const char *format, ...); -void log_error(const char *format, ...); +void log_debug(int level, const char *format, ...) ISC_FORMAT_PRINTF(2, 3); +void log_error(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); #endif /* !_LD_LOG_H_ */ @@ -20,6 +20,7 @@ #ifndef _LD_STR_H_ #define _LD_STR_H_ +#include <isc/formatcheck.h> #include <isc/mem.h> #define LD_MAX_SPLITS 256 @@ -55,7 +56,7 @@ isc_result_t str_cat_char_len(ld_string_t *dest, const char *src, size_t len); isc_result_t str_cat_isc_region(ld_string_t *dest, const isc_region_t *region); isc_result_t str_cat_isc_buffer(ld_string_t *dest, const isc_buffer_t *buffer); isc_result_t str_cat(ld_string_t *dest, const ld_string_t *src); -isc_result_t str_sprintf(ld_string_t *dest, const char *format, ...); +isc_result_t str_sprintf(ld_string_t *dest, const char *format, ...) ISC_FORMAT_PRINTF(2, 3); isc_result_t str_vsprintf(ld_string_t *dest, const char *format, va_list ap); void str_toupper(ld_string_t *str); |