From: Donald Sharp Date: Sat, 4 Jun 2016 23:12:18 +0000 (-0400) Subject: lib, bgpd: Fixup some more compile errors due to warnings X-Git-Tag: frr-2.0-rc1~623 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=69f30024c1af1b0d0fc11ba7ab1e28024953363b;p=matthieu%2Ffrr.git 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 --- 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)