C++: Fix warnings

This commit is contained in:
Olivier Goffart 2020-11-19 13:46:30 +01:00
parent 3fce3e6f1b
commit 7113187864
3 changed files with 3 additions and 2 deletions

View file

@ -48,6 +48,7 @@ public:
case cbindgen_private::types::PathData::Tag::None: case cbindgen_private::types::PathData::Tag::None:
return true; return true;
} }
return false; //unreachable
} }
friend bool operator!=(const PathData &a, const PathData &b) { friend bool operator!=(const PathData &a, const PathData &b) {
return !(a == b); return !(a == b);

View file

@ -13,8 +13,7 @@ TestCase := Rectangle {
/* /*
```cpp ```cpp
auto handle = TestCase::create(); TestCase::create();
const TestCase &instance = *handle;
``` ```
```rust ```rust

View file

@ -93,6 +93,7 @@ pub fn test(testcase: &test_driver_lib::TestCase) -> Result<(), Box<dyn Error>>
if compiler.is_like_clang() || compiler.is_like_gnu() { if compiler.is_like_clang() || compiler.is_like_gnu() {
compiler_command.arg("-std=c++17"); compiler_command.arg("-std=c++17");
compiler_command.arg("-g"); compiler_command.arg("-g");
compiler_command.arg("-Werror").arg("-Wall").arg("-Wextra");
compiler_command.arg(concat!("-L", env!("CPP_LIB_PATH"))); compiler_command.arg(concat!("-L", env!("CPP_LIB_PATH")));
compiler_command.arg("-lsixtyfps_rendering_backend_default"); compiler_command.arg("-lsixtyfps_rendering_backend_default");
compiler_command.arg("-o").arg(&*binary_path); compiler_command.arg("-o").arg(&*binary_path);