diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-05-11 11:48:03 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-05-11 11:48:03 +0000 |
commit | bb6254b76889e6f6318d09cd3ce911ee5e384c4d (patch) | |
tree | bd0ff6f683e67e1e7880dea31b0c52d2d471b708 /usr.sbin/rpki-client | |
parent | fa9d7f75a21b7ced6ffe8095968d4727e06d8a48 (diff) |
Make sure some variables are initialised since modern gcc warns about them.
Handle rrdppid like we do for all other child processes. The two warnings
in rrdp are probably false positives.
OK tb@
Diffstat (limited to 'usr.sbin/rpki-client')
-rw-r--r-- | usr.sbin/rpki-client/main.c | 6 | ||||
-rw-r--r-- | usr.sbin/rpki-client/rrdp_delta.c | 2 | ||||
-rw-r--r-- | usr.sbin/rpki-client/rrdp_notification.c | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/rpki-client/main.c b/usr.sbin/rpki-client/main.c index 5645c398963..40bb51d869c 100644 --- a/usr.sbin/rpki-client/main.c +++ b/usr.sbin/rpki-client/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.140 2021/05/11 11:43:21 claudio Exp $ */ +/* $OpenBSD: main.c,v 1.141 2021/05/11 11:48:02 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -861,8 +861,10 @@ main(int argc, char *argv[]) close(fd[0]); rrdp = fd[1]; - } else + } else { rrdp = -1; + rrdppid = -1; + } if (timeout) { /* diff --git a/usr.sbin/rpki-client/rrdp_delta.c b/usr.sbin/rpki-client/rrdp_delta.c index 7957a72be72..774f0b15a1c 100644 --- a/usr.sbin/rpki-client/rrdp_delta.c +++ b/usr.sbin/rpki-client/rrdp_delta.c @@ -115,7 +115,7 @@ start_publish_withdraw_elem(struct delta_xml *dxml, const char **attr, int withdraw) { XML_Parser p = dxml->parser; - char *uri, hash[SHA256_DIGEST_LENGTH]; + char *uri = NULL, hash[SHA256_DIGEST_LENGTH]; int i, hasUri = 0, hasHash = 0; enum publish_type pub = PUB_UPD; diff --git a/usr.sbin/rpki-client/rrdp_notification.c b/usr.sbin/rpki-client/rrdp_notification.c index 6ad1006d921..9ff8c9ae248 100644 --- a/usr.sbin/rpki-client/rrdp_notification.c +++ b/usr.sbin/rpki-client/rrdp_notification.c @@ -351,7 +351,7 @@ enum rrdp_task notification_done(struct notification_xml *nxml, char *last_mod) { struct delta_item *d; - long long s, last_s; + long long s, last_s = 0; nxml->current->last_mod = last_mod; nxml->current->session_id = xstrdup(nxml->session_id); |