Mercurial > vim
changeset 22825:3996539f38b4 v8.2.1960
patch 8.2.1960: warning for uninitialized variable
Commit: https://github.com/vim/vim/commit/0fd797eacd569a0680a86452c18713eacf6608fe
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 5 20:46:32 2020 +0100
patch 8.2.1960: warning for uninitialized variable
Problem: Warning for uninitialized variable.
Solution: Initialize the variable.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 05 Nov 2020 21:00:04 +0100 |
parents | 8dad79c661d1 |
children | 4d437e6f0be7 |
files | src/evalfunc.c src/version.c |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -6873,7 +6873,7 @@ f_rand(typval_T *argvars, typval_T *rett static UINT32_T gx, gy, gz, gw; static int initialized = FALSE; listitem_T *lx, *ly, *lz, *lw; - UINT32_T x, y, z, w, t, result; + UINT32_T x = 0, y, z, w, t, result; if (argvars[0].v_type == VAR_UNKNOWN) {