1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-10-27 20:34:10 +00:00

clang-tidy: enable default checks

This commit is contained in:
Falk Werner 2023-01-06 17:10:56 +01:00
parent 9555729fe9
commit 4610b82d78
3 changed files with 5 additions and 5 deletions

View File

@ -39,7 +39,7 @@ target_link_libraries(webfuse_static PUBLIC PkgConfig::FUSE PkgConfig::LWS)
if(NOT(WITHOUT_CLANG_TIDY)) if(NOT(WITHOUT_CLANG_TIDY))
set_property( set_property(
TARGET webfuse_static TARGET webfuse_static
PROPERTY CXX_CLANG_TIDY clang-tidy -checks=-*,readability-*,-readability-identifier-length -warnings-as-errors=*) PROPERTY CXX_CLANG_TIDY clang-tidy -checks=readability-*,-readability-identifier-length -warnings-as-errors=*)
endif() endif()

View File

@ -182,7 +182,6 @@ static int fs_readdir(char const * path, void * buffer,
fuse_readdir_flags flags) fuse_readdir_flags flags)
{ {
auto * const fs = fs_get_filesystem(); auto * const fs = fs_get_filesystem();
auto handle = fs_get_handle(info);
std::vector<std::string> names; std::vector<std::string> names;
auto const result = fs->readdir(path, names); auto const result = fs->readdir(path, names);
if (0 == result) if (0 == result)

View File

@ -45,7 +45,7 @@ void do_receive(void * in, int len, lws* wsi, user_data * data)
{ {
webfuse::messagereader reader(data->current_message); webfuse::messagereader reader(data->current_message);
uint32_t id = reader.read_u32(); uint32_t id = reader.read_u32();
uint8_t message_type = reader.read_u8(); reader.read_u8(); // read message type: ToDo: use it
std::lock_guard<std::mutex> lock(data->mut); std::lock_guard<std::mutex> lock(data->mut);
auto it = data->pending_responses.find(id); auto it = data->pending_responses.find(id);
@ -132,7 +132,7 @@ static int ws_server_callback(struct lws *wsi, enum lws_callback_reasons reason,
{ {
size_t size; size_t size;
unsigned char * raw_data = writer.get_data(size); unsigned char * raw_data = writer.get_data(size);
int const rc = lws_write(data->connection, raw_data, size, LWS_WRITE_BINARY); lws_write(data->connection, raw_data, size, LWS_WRITE_BINARY);
} }
if (has_more) if (has_more)
@ -178,7 +178,8 @@ public:
context = lws_create_context(&info); context = lws_create_context(&info);
lws_vhost * const vhost = lws_create_vhost(context, &info); lws_create_vhost(context, &info);
// lws_vhost * const vhost = lws_create_vhost(context, &info);
// port = lws_get_vhost_port(vhost); // port = lws_get_vhost_port(vhost);