Skip to content

no warnings #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ build:windows --host_platform=@ecsact_runtime//bazel/platforms:windows
build:linux --platforms=@ecsact_runtime//bazel/platforms:linux
build:linux --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux

build:no-warnings --per_file_copt=//.*@-Werror

common:linux:ci --config=no-warnings
common:ci --announce_rc
common:ci --disk_cache=~/.cache/bazel-disk-cache
test:ci --test_output=errors
Expand Down
4 changes: 2 additions & 2 deletions dylib/dylib-util.hh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#define ECSACT_DYLIB_UTIL_FN_PTR_DEFN(fn_name, unused) \
decltype(::fn_name)(::fn_name) = nullptr
decltype(fn_name)(fn_name) = nullptr

#define ECSACT_DYLIB_UTIL_FN_PTR_ASSIGN(fn_name) (::fn_name) = nullptr
#define ECSACT_DYLIB_UTIL_FN_PTR_ASSIGN(fn_name) (fn_name) = nullptr
8 changes: 4 additions & 4 deletions dylib/dylib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ FOR_EACH_ECSACT_SERIALIZE_API_FN(ECSACT_DYLIB_UTIL_FN_PTR_DEFN);
#define HAS_FN_CHECK(fn_name, target_fn_name) \
if(std::strcmp(target_fn_name, #fn_name) == 0) return true

#define ASSIGN_FN_IF(fn_name, target_fn_name, fn_ptr) \
if(std::strcmp(#fn_name, target_fn_name) == 0) { \
::fn_name = reinterpret_cast<decltype(::fn_name)>(fn_ptr); \
} \
#define ASSIGN_FN_IF(fn_name, target_fn_name, fn_ptr) \
if(std::strcmp(#fn_name, target_fn_name) == 0) { \
fn_name = reinterpret_cast<decltype(fn_name)>(fn_ptr); \
} \
static_assert(true, "macro requires ;")

bool ecsact_dylib_has_fn(const char* fn_name) {
Expand Down
1 change: 0 additions & 1 deletion reference/async_reference/async_reference.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ void async_reference::execute_systems() {
execution_thread = std::thread([this] {
using namespace std::chrono_literals;
using clock = std::chrono::high_resolution_clock;
using milliseconds = std::chrono::milliseconds;
using nanoseconds = std::chrono::nanoseconds;
using std::chrono::duration_cast;

Expand Down
8 changes: 2 additions & 6 deletions reference/async_reference/util/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ static ecsact_async_error validate_instructions(
for(auto& component : components) {
auto view = std::views::filter(
components_range,
[&components_range,
&component](types::cpp_execution_component other_component) {
[&component](types::cpp_execution_component other_component) {
return component._id == other_component._id;
}
);
Expand Down Expand Up @@ -52,8 +51,6 @@ ecsact_async_error validate_merge_instructions(
auto entities = util::get_cpp_entities(components);
auto other_entities = util::get_cpp_entities(other_components);

auto empty_view = std::ranges::empty_view<int>{};

auto has_duplicates =
util::check_entity_merge_duplicates(entities, other_entities);

Expand All @@ -64,8 +61,7 @@ ecsact_async_error validate_merge_instructions(
for(auto& component : components) {
auto component_view = std::views::filter(
other_components,
[&other_components,
&component](types::cpp_execution_component other_component) {
[&component](types::cpp_execution_component other_component) {
return component._id == other_component._id;
}
);
Expand Down
4 changes: 2 additions & 2 deletions reference/async_reference/util/util.hh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ bool check_entity_duplicates(auto entities_view) {
return entity_id == other_entity;
});
int same_entity_count = 0;
for(auto _ : duplicate_view) {
for([[maybe_unused]] auto _ : duplicate_view) {
same_entity_count++;
if(same_entity_count > 1) {
return true;
Expand All @@ -71,7 +71,7 @@ bool check_entity_merge_duplicates(
});

int same_entity_count = 0;
for(auto _ : duplicate_view) {
for([[maybe_unused]] auto _ : duplicate_view) {
same_entity_count++;
if(same_entity_count > 0) {
return true;
Expand Down