diff --git a/src/lua_maplib.c b/src/lua_maplib.c
index 568a99b68fc9e173272ec6eda9a847ad83d1b2f4..3d95cdb751f8ae349ed026591ede5cd55438b189 100644
--- a/src/lua_maplib.c
+++ b/src/lua_maplib.c
@@ -2822,6 +2822,7 @@ static int mapheaderinfo_get(lua_State *L)
 		break;
 	// TODO add support for reading numGradedMares and grades
 	default:
+	{
 		// Read custom vars now
 		// (note: don't include the "LUA." in your lua scripts!)
 		UINT8 j = 0;
@@ -2832,6 +2833,7 @@ static int mapheaderinfo_get(lua_State *L)
 		else
 			lua_pushnil(L);
 	}
+	}
 	return 1;
 }
 
diff --git a/src/lua_mobjlib.c b/src/lua_mobjlib.c
index 404af016a6e6076f70aa20593db2189edfadafa4..851c569d27f093cd7000f465fa1b60e4ffd4769e 100644
--- a/src/lua_mobjlib.c
+++ b/src/lua_mobjlib.c
@@ -1043,11 +1043,13 @@ static int mapthing_set(lua_State *L)
 			mt->z = (INT16)luaL_checkinteger(L, 3);
 			break;
 		case mapthing_extrainfo:
+		{
 			INT32 extrainfo = luaL_checkinteger(L, 3);
 			if (extrainfo & ~15)
 				return luaL_error(L, "mapthing_t extrainfo set %d out of range (%d - %d)", extrainfo, 0, 15);
 			mt->extrainfo = (UINT8)extrainfo;
 			break;
+		}
 		case mapthing_tag:
 			Tag_FSet(&mt->tags, (INT16)luaL_checkinteger(L, 3));
 			break;
diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c
index f0fa2ed94b051ae7257044b76cd404a301bc62c4..510e481e66412569d22b55e077deee38291db985 100644
--- a/src/lua_playerlib.c
+++ b/src/lua_playerlib.c
@@ -1297,6 +1297,7 @@ static int player_set(lua_State *L)
 		break;
 	}
 	case player_awayviewtics:
+	{
 		INT32 tics = (INT32)luaL_checkinteger(L, 3);
 		if (tics && !plr->awayviewmobj) // awayviewtics must ALWAYS have an awayviewmobj set!!
 			P_SetTarget(&plr->awayviewmobj, plr->mo); // but since the script might set awayviewmobj immediately AFTER setting awayviewtics, use player mobj as filler for now.
@@ -1308,6 +1309,7 @@ static int player_set(lua_State *L)
 		}
 		plr->awayviewtics = tics;
 		break;
+	}
 	case player_awayviewaiming:
 		plr->awayviewaiming = luaL_checkangle(L, 3);
 		break;