From 69f30024c1af1b0d0fc11ba7ab1e28024953363b Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 4 Jun 2016 19:12:18 -0400 Subject: [PATCH] lib, bgpd: Fixup some more compile errors due to warnings Original cherry-pick done on a fedora box with a completely different compiler. Signed-off-by: Donald Sharp --- bgpd/bgp_routemap.c | 2 +- lib/log.c | 2 +- lib/thread.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index a7d62a6b37..f237f7689b 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -899,7 +899,7 @@ route_match_probability (void *rule, struct prefix *prefix, case 0: break; case RAND_MAX: return RMAP_MATCH; default: - if (r < *(unsigned long *) rule) + if (r < *(long *) rule) { return RMAP_MATCH; } diff --git a/lib/log.c b/lib/log.c index 5354d32c0f..453a611dcd 100644 --- a/lib/log.c +++ b/lib/log.c @@ -474,7 +474,7 @@ zlog_signal(int signo, const char *action s = str_append (LOC, "\n"); } -#define DUMP(FD) write(FD, buf, s-buf); +#define DUMP(FD) write_wrapper(FD, buf, s-buf); /* If no file logging configured, try to write to fallback log file. */ if (logfile_fd >= 0) DUMP(logfile_fd) diff --git a/lib/thread.c b/lib/thread.c index 21fb2b9563..2b1ca13dee 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -813,7 +813,7 @@ generic_thread_add(struct thread_master *m, int (*func) (struct thread *), /* is there enough space for a new fd? */ assert (queuepos < m->handler.pfdsize); - thread = thread_get (m, type, func, arg, funcname, debugargpass); + thread = thread_get (m, type, func, arg, debugargpass); m->handler.pfds[queuepos].fd = fd; m->handler.pfds[queuepos].events |= event; if (queuepos == m->handler.pfdcount) -- 2.39.5