From 5bd95649de65d5b675fb5061688dc47e9ab2a7a7 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 28 Jan 2021 09:45:16 -0500 Subject: [PATCH] fix some warnings seen by Microsoft Visual Studio compiler ../src/nhlsel.c(467) : warning C4701: potentially uninitialized local variable 'x1' used ../src/nhlsel.c(591) : warning C4701: potentially uninitialized local variable 'x' used ../src/nhlsel.c(467) : warning C4701: potentially uninitialized local variable 'y1' used ../src/nhlsel.c(591) : warning C4701: potentially uninitialized local variable 'y' used ../src/nhlsel.c(469) : warning C4701: potentially uninitialized local variable 'x2' used ../src/nhlsel.c(469) : warning C4701: potentially uninitialized local variable 'y2' used --- src/nhlsel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nhlsel.c b/src/nhlsel.c index 2b142a706..58e712f9f 100644 --- a/src/nhlsel.c +++ b/src/nhlsel.c @@ -442,7 +442,7 @@ l_selection_randline(lua_State *L) { int argc = lua_gettop(L); struct selectionvar *sel = (struct selectionvar *) 0; - xchar x1, y1, x2, y2; + xchar x1 = 0, y1 = 0, x2 = 0, y2 = 0; int roughness = 7; if (argc == 6) { @@ -575,7 +575,7 @@ l_selection_flood(lua_State *L) { int argc = lua_gettop(L); struct selectionvar *sel = (struct selectionvar *) 0; - xchar x, y; + xchar x = 0, y = 0; if (argc == 2) { x = (xchar) luaL_checkinteger(L, 1);