]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Add missing argument in some call to LLOG_INFO in lldp.c.
authorVincent Bernat <bernat@luffy.cx>
Mon, 17 Aug 2009 17:46:28 +0000 (19:46 +0200)
committerVincent Bernat <bernat@luffy.cx>
Mon, 17 Aug 2009 17:46:28 +0000 (19:46 +0200)
This fixes #17. Also add __attribute__ to log_* functions to let gcc
automatically check for this.

src/lldp.c
src/lldpd.h

index 3fd564722ca17fc68fed76f51b3861d1eb337380..1ac88e1ba65737a248f746cdb366260bbcb4e7e0 100644 (file)
@@ -553,6 +553,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;
                                        }
index 796786c4720b42e078333ebed6f48b5ae5c3b016..e752a5a5774efca413597e45de6c6d01c8556ecb 100644 (file)
@@ -412,13 +412,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 *);