Date: Wed, 15 Sep 2021 16:05:27 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: b14cd3a8339e - main - efitable: Don't pass NULL as a format string to xo_err(). Message-ID: <202109151605.18FG5RTK086395@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b14cd3a8339ea72cf39df4ccc53c830875c5d866 commit b14cd3a8339ea72cf39df4ccc53c830875c5d866 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2021-09-15 16:03:17 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2021-09-15 16:03:17 +0000 efitable: Don't pass NULL as a format string to xo_err(). This fixes a -Wformat error reported by GCC 9. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D31939 --- usr.sbin/efitable/efitable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/efitable/efitable.c b/usr.sbin/efitable/efitable.c index 367ce3f033b1..6bd4d96ffd2a 100644 --- a/usr.sbin/efitable/efitable.c +++ b/usr.sbin/efitable/efitable.c @@ -146,13 +146,13 @@ main(int argc, char **argv) table.uuid = efi_table_ops[efi_idx].uuid; if (ioctl(efi_fd, EFIIOC_GET_TABLE, &table) == -1) - xo_err(EX_OSERR, NULL); + xo_err(EX_OSERR, "EFIIOC_GET_TABLE (len == 0)"); table.buf = malloc(table.table_len); table.buf_len = table.table_len; if (ioctl(efi_fd, EFIIOC_GET_TABLE, &table) == -1) - xo_err(EX_OSERR, NULL); + xo_err(EX_OSERR, "EFIIOC_GET_TABLE"); efi_table_ops[efi_idx].parse(table.buf); close(efi_fd);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109151605.18FG5RTK086395>