Skip to content

Commit

Permalink
Enable conversion warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
FiniteReality committed Feb 21, 2022
1 parent 0a72050 commit 1cb7aeb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/lib/compiler/parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ char const* read_func(lua_State*, void* data, size_t* size)
// Otherwise, fall back to a traditional blocking read
reader->stream.read(reader->buffer.data(), (std::streamsize)reader->buffer.size());

*size = reader->stream.gcount();
*size = (std::size_t)reader->stream.gcount();
}

return reader->buffer.data();
Expand Down
6 changes: 5 additions & 1 deletion thirdparty/lua/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,15 @@ target_compile_options(lua
$<$<CXX_COMPILER_ID:GNU>:-Wno-misleading-indentation>
# $<$<CXX_COMPILER_ID:MSVC>:/wd4390> # no msvc error for this?

$<$<CXX_COMPILER_ID:AppleClang>:-Wno-conversion>
$<$<CXX_COMPILER_ID:Clang>:-Wno-conversion>
$<$<CXX_COMPILER_ID:GNU>:-Wno-conversion>
$<$<CXX_COMPILER_ID:MSVC>:/wd4365> # conversion from 'a' to 'b', signed/unsigned mismatch

$<$<CXX_COMPILER_ID:MSVC>:/wd4820> # bytes padding added after data member
$<$<CXX_COMPILER_ID:MSVC>:/wd4061> # enum values are not explicitly handled
$<$<CXX_COMPILER_ID:MSVC>:/D_CRT_SECURE_NO_WARNINGS /D_SCL_NO_WARNINGS> # function or variable may be unsafe
$<$<CXX_COMPILER_ID:MSVC>:/wd5220> # non-static data member with a volatile qualified type
$<$<CXX_COMPILER_ID:MSVC>:/wd4365> # conversion from 'a' to 'b', signed/unsigned mismatch
$<$<CXX_COMPILER_ID:MSVC>:/wd5045> # compiler will insert spectre mitigation for memory load
$<$<CXX_COMPILER_ID:MSVC>:/wd4334> # result of 32-bit shift implicitly converted to 64-bits
$<$<CXX_COMPILER_ID:MSVC>:/wd4774> # format string expected in argument 2 is not a string literal
Expand Down

0 comments on commit 1cb7aeb

Please sign in to comment.