git: 2207aaba8977 - main - kern_exec.c: quiet gcc -Wmaybe-uninitialized
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 09 Jul 2024 18:45:16 UTC
The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=2207aaba8977a91f5e076beeeba2e4a47f4f7379 commit 2207aaba8977a91f5e076beeeba2e4a47f4f7379 Author: Ryan Libby <rlibby@FreeBSD.org> AuthorDate: 2024-07-09 17:57:33 +0000 Commit: Ryan Libby <rlibby@FreeBSD.org> CommitDate: 2024-07-09 17:57:33 +0000 kern_exec.c: quiet gcc -Wmaybe-uninitialized Reported by: GCC -Wmaybe-uninitialized Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45916 --- sys/kern/kern_exec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 6727872b5b10..63f007624e36 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1952,6 +1952,7 @@ compress_chunk(struct coredump_params *cp, char *base, char *buf, size_t len) size_t chunk_len; int error; + error = 0; while (len > 0) { chunk_len = MIN(len, CORE_BUF_SIZE); @@ -1997,6 +1998,7 @@ core_output(char *base, size_t len, off_t offset, struct coredump_params *cp, if (cp->comp != NULL) return (compress_chunk(cp, base, tmpbuf, len)); + error = 0; map = &cp->td->td_proc->p_vmspace->vm_map; for (; len > 0; base += runlen, offset += runlen, len -= runlen) { /*