From 1ce29ab7479380f671ba77023e4c08c3ec6a1d9e Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sun, 17 May 2020 19:57:08 -0700 Subject: Fix warnings from Clang's analyzer Suppress a warning about not declaring a function noreturn that's only noreturn in some configurations. Add an assert to unconfuse the static analyzer about a default value for a struct. --- client/wallet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'client/wallet.c') diff --git a/client/wallet.c b/client/wallet.c index 194f1f5..435f000 100644 --- a/client/wallet.c +++ b/client/wallet.c @@ -2,7 +2,7 @@ * The client program for the wallet system. * * Written by Russ Allbery - * Copyright 2018 Russ Allbery + * Copyright 2018, 2020 Russ Allbery * Copyright 2006-2008, 2010, 2014 * The Board of Trustees of the Leland Stanford Junior University * @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -181,6 +182,7 @@ main(int argc, char *argv[]) count++; } command = xcalloc(count, sizeof(struct iovec)); + assert(options.type != NULL); command[0].iov_base = (char *) options.type; command[0].iov_len = strlen(options.type); for (i = 0; i < argc; i++) { -- cgit v1.2.3