From 720ce64b9d9014834ae5842a8a9bbc91f51fe8f5 Mon Sep 17 00:00:00 2001 From: Oz Date: Thu, 22 Aug 2024 20:30:55 +0200 Subject: [PATCH] Fix clang-tidy warnings and code formatting --- src/bitarchiveitem.cpp | 4 ++-- src/internal/windows.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bitarchiveitem.cpp b/src/bitarchiveitem.cpp index 1c4e9895..8b930804 100644 --- a/src/bitarchiveitem.cpp +++ b/src/bitarchiveitem.cpp @@ -130,10 +130,10 @@ auto BitArchiveItem::crc() const -> uint32_t { // On MSVC, these macros are not defined, so we define them here. #if !defined(S_ISLNK) #ifndef S_IFLNK -constexpr auto S_IFLNK = 0xA000; +static constexpr auto S_IFLNK = 0xA000u; #endif #ifndef S_IFMT -constexpr auto S_IFMT = 0xF000; +static constexpr auto S_IFMT = 0xF000u; #endif #define S_ISLNK( m ) (((m) & S_IFMT) == S_IFLNK) #endif diff --git a/src/internal/windows.hpp b/src/internal/windows.hpp index 7faed7ad..dbbe363a 100644 --- a/src/internal/windows.hpp +++ b/src/internal/windows.hpp @@ -188,7 +188,7 @@ constexpr auto HRESULT_WIN32_ERROR_NEGATIVE_SEEK = __HRESULT_FROM_WIN32( ERROR_N // Note: this needs to be defined on all platforms, as it is a custom file attributes extension defined by p7zip/7-zip. #ifndef FILE_ATTRIBUTE_UNIX_EXTENSION -constexpr auto FILE_ATTRIBUTE_UNIX_EXTENSION = 0x8000; // As defined by p7zip +constexpr auto FILE_ATTRIBUTE_UNIX_EXTENSION = 0x8000u; // As defined by p7zip #endif #endif //WINDOWS_HPP