In ospfd, add format attributes to the proper functions and then fix the
warning in rde.c.
ok?
diff --git log.h log.h
index e0034e8..a682f67 100644
--- log.h
+++ log.h
@@ -23,13 +23,21 @@
void log_init(int);
void log_verbose(int);
-void logit(int, const char *, ...);
-void vlog(int, const char *, va_list);
-void log_warn(const char *, ...);
-void log_warnx(const char *, ...);
-void log_info(const char *, ...);
-void log_debug(const char *, ...);
-void fatal(const char *) __dead;
-void fatalx(const char *) __dead;
+void logit(int, const char *, ...)
+ __attribute__((__format__ (printf, 2, 3)));
+void vlog(int, const char *, va_list)
+ __attribute__((__format__ (printf, 2, 0)));
+void log_warn(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void log_warnx(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void log_info(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void log_debug(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void fatal(const char *) __dead
+ __attribute__((__format__ (printf, 1, 0)));
+void fatalx(const char *) __dead
+ __attribute__((__format__ (printf, 1, 0)));
#endif /* _LOG_H_ */
diff --git rde.c rde.c
index 6d53eb3..eca497a 100644
--- rde.c
+++ rde.c
@@ -374,7 +374,7 @@ rde_dispatch_imsg(int fd, short event, void *bula)
}
}
if (l != 0 && !error)
- log_warnx("rde_dispatch_imsg: peerid %lu, "
+ log_warnx("rde_dispatch_imsg: peerid %u, "
"trailing garbage in Database Description "
"packet", imsg.hdr.peerid);
@@ -411,7 +411,7 @@ rde_dispatch_imsg(int fd, short event, void *bula)
ntohs(v->lsa->hdr.len));
}
if (l != 0)
- log_warnx("rde_dispatch_imsg: peerid %lu, "
+ log_warnx("rde_dispatch_imsg: peerid %u, "
"trailing garbage in LS Request "
"packet", imsg.hdr.peerid);
break;