From: Vincent Bernat Date: Mon, 17 Aug 2009 17:46:28 +0000 (+0200) Subject: Add missing argument in some call to LLOG_INFO in lldp.c. X-Git-Tag: 0.4.1~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c3bdd0d81a68981aa89ef6feccc51954a0f41347;p=thirdparty%2Flldpd.git Add missing argument in some call to LLOG_INFO in lldp.c. This fixes #17. Also add __attribute__ to log_* functions to let gcc automatically check for this. --- diff --git a/src/lldp.c b/src/lldp.c index 269f344d..878a8dcd 100644 --- a/src/lldp.c +++ b/src/lldp.c @@ -557,6 +557,7 @@ lldp_decode(struct lldpd *cfg, char *frame, int s, ((policy >> 24) > LLDPMED_APPTYPE_LAST)) { LLOG_INFO("unknown policy field %d " "received on %s", + policy, hardware->h_ifname); break; } diff --git a/src/lldpd.h b/src/lldpd.h index 19683ed5..7063f1d8 100644 --- a/src/lldpd.h +++ b/src/lldpd.h @@ -403,13 +403,13 @@ char *dmi_asset(); /* log.c */ void log_init(int); -void log_warn(const char *, ...); +void log_warn(const char *, ...) __attribute__ ((format (printf, 1, 2))); #define LLOG_WARN(x,...) log_warn("%s: " x, __FUNCTION__, ##__VA_ARGS__) -void log_warnx(const char *, ...); +void log_warnx(const char *, ...) __attribute__ ((format (printf, 1, 2))); #define LLOG_WARNX(x,...) log_warnx("%s: " x, __FUNCTION__, ##__VA_ARGS__) -void log_info(const char *, ...); +void log_info(const char *, ...) __attribute__ ((format (printf, 1, 2))); #define LLOG_INFO(x,...) log_info("%s: " x, __FUNCTION__, ##__VA_ARGS__) -void log_debug(const char *, ...); +void log_debug(const char *, ...) __attribute__ ((format (printf, 1, 2))); #define LLOG_DEBUG(x,...) log_debug("%s: " x, __FUNCTION__, ##__VA_ARGS__) void fatal(const char *); void fatalx(const char *);