Skip to content

Commit

Permalink
[all] fix: try to suppress some obnoxious warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jd28 committed Oct 21, 2024
1 parent 3dfd1ae commit 2653d99
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmake/CompilerWarnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function(set_project_warnings project_name)
-Wduplicated-branches # warn if if / else branches have duplicated code
-Wlogical-op # warn about logical operations being used where bitwise were probably wanted
-Wuseless-cast # warn if you perform a cast to the same type
-Wno-array-bounds # Annoying immer verbose warings
)

if(MSVC)
Expand Down
2 changes: 1 addition & 1 deletion rollnw-py/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ target_link_libraries(rollnw PRIVATE
pybind11::module
)

target_include_directories(rollnw PRIVATE
target_include_directories(rollnw SYSTEM PRIVATE
../lib
../lib/nw/profiles
../external/pybind11_json/include
Expand Down
4 changes: 3 additions & 1 deletion tests/script_nss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ TEST(Nss, Variables)
const script::Ast& s1 = nss1.ast();
auto decl1 = dynamic_cast<script::DeclList*>(s1.decls[0]);
EXPECT_TRUE(decl1);
EXPECT_EQ(decl1->decls.size(), 3);
if (decl1) {
EXPECT_EQ(decl1->decls.size(), 3);
}

// Empty statement..
script::Nss nss2("void test_function(string s, int b) { int a;; }"sv, ctx.get());
Expand Down

0 comments on commit 2653d99

Please sign in to comment.