summaryrefslogtreecommitdiffstats
path: root/babeld
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-08-26 01:14:25 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-08-26 01:46:40 +0200
commita97986ffba560458b2b1e88b09b31822f78d8542 (patch)
tree49ae3ae301d7e1052d69fe0884a565897ca65576 /babeld
parentMerge pull request #1045 from opensourcerouting/clippy-coverity (diff)
downloadfrr-a97986ffba560458b2b1e88b09b31822f78d8542.tar.xz
frr-a97986ffba560458b2b1e88b09b31822f78d8542.zip
*: fix compiler warnings
Specifically, gcc 4.2.1 on OpenBSD 6.0 warns about these; they're bogus (gcc 4.2, being rather old, isn't quite as "intelligent" as newer versions; the newer ones apply more logic and less warnings.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'babeld')
-rw-r--r--babeld/babeld.c4
-rw-r--r--babeld/message.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/babeld/babeld.c b/babeld/babeld.c
index f995745e4..207c37d9b 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -331,8 +331,8 @@ babel_main_loop(struct thread *thread)
/* if there is no timeout, we must wait. */
if(timeval_compare(&tv, &babel_now) > 0) {
timeval_minus(&tv, &tv, &babel_now);
- debugf(BABEL_DEBUG_TIMEOUT, "babel main loop : timeout: %ld msecs",
- tv.tv_sec * 1000 + tv.tv_usec / 1000);
+ debugf(BABEL_DEBUG_TIMEOUT, "babel main loop : timeout: %lld msecs",
+ (long long)tv.tv_sec * 1000 + tv.tv_usec / 1000);
/* it happens often to have less than 1 ms, it's bad. */
timeval_add_msec(&tv, &tv, 300);
babel_set_timer(&tv);
diff --git a/babeld/message.c b/babeld/message.c
index 5990373b6..e31d5de5d 100644
--- a/babeld/message.c
+++ b/babeld/message.c
@@ -391,7 +391,7 @@ parse_packet(const unsigned char *from, struct interface *ifp,
} else if(type == MESSAGE_HELLO) {
unsigned short seqno, interval;
int changed;
- unsigned int timestamp;
+ unsigned int timestamp = 0;
DO_NTOHS(seqno, message + 4);
DO_NTOHS(interval, message + 6);
debugf(BABEL_DEBUG_COMMON,"Received hello %d (%d) from %s on %s.",