Skip to content

Commit d749b47

Browse files
committed
Update Clang-format, fix warnings
1 parent d058993 commit d749b47

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

extra/validate_format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
include_paths = ["src/", "inc/", "tests/", "examples/"]
1111
include_extenions = [".cc", ".hh", ".cpp", ".hpp"]
1212
version_pattern = re.compile("version ([0-9]+\.[0-9]+)\.[0-9]+")
13-
allowed_clangformat_versions = ["14.0", "16.0", "18.0", "18.1"]
13+
allowed_clangformat_versions = ["14.0", "16.0", "18.0", "18.1", "20.1"]
1414

1515
def run_clang_format(filepath, fix):
1616
if fix:

inc/Tecs_observer.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ namespace Tecs {
7474
* Events will be returned in the order they occured, up until the start of the current transaction.
7575
*/
7676
bool Poll(Lock<ECSType> lock, EventType &eventOut) const {
77+
(void)lock; // Fix unused warning
7778
auto eventList = eventListWeak.lock();
7879
if (eventList && !eventList->empty()) {
7980
eventOut = eventList->front();

tests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/tracy/CMakeLists.txt)
6767
set(TRACY_ONLY_LOCALHOST ON CACHE BOOL "" FORCE)
6868
add_subdirectory(tracy)
6969
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
70-
target_compile_options(TracyClient PRIVATE -Wno-unused-result)
70+
target_compile_options(TracyClient PRIVATE -Wno-unused-result -Wno-unused-function -Wno-maybe-uninitialized)
7171
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
72-
target_compile_options(TracyClient PRIVATE -Wno-unused-private-field)
72+
target_compile_options(TracyClient PRIVATE -Wno-unused-private-field -Wno-unused-function)
7373
endif()
7474

7575
add_executable(${PROJECT_NAME}-benchmark-tracy

0 commit comments

Comments
 (0)