Skip to content

Commit d58f1d3

Browse files
committed
common : cont
ggml-ci
1 parent 10eb874 commit d58f1d3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

cmake/common.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function(llama_add_compile_flags)
1919
list(APPEND CXX_FLAGS -Wshadow)
2020

2121
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
22-
list(APPEND CXX_FLAGS -Wshadow -Wshadow-field-in-constructor)
22+
list(APPEND CXX_FLAGS -Wshadow-field-in-constructor)
2323
endif()
2424
endif()
2525

common/common.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ static bool common_download_file(const std::string & url, const std::string & pa
12081208
{
12091209
typedef size_t(*CURLOPT_HEADERFUNCTION_PTR)(char *, size_t, size_t, void *);
12101210
auto header_callback = [](char * buffer, size_t /*size*/, size_t n_items, void * userdata) -> size_t {
1211-
common_load_model_from_url_headers * headers = (common_load_model_from_url_headers *) userdata;
1211+
common_load_model_from_url_headers * cur = (common_load_model_from_url_headers *) userdata;
12121212

12131213
static std::regex header_regex("([^:]+): (.*)\r\n");
12141214
static std::regex etag_regex("ETag", std::regex_constants::icase);
@@ -1220,9 +1220,9 @@ static bool common_download_file(const std::string & url, const std::string & pa
12201220
const std::string & key = match[1];
12211221
const std::string & value = match[2];
12221222
if (std::regex_match(key, match, etag_regex)) {
1223-
headers->etag = value;
1223+
cur->etag = value;
12241224
} else if (std::regex_match(key, match, last_modified_regex)) {
1225-
headers->last_modified = value;
1225+
cur->last_modified = value;
12261226
}
12271227
}
12281228
return n_items;

examples/run/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang"
99
target_compile_options(${TARGET} PRIVATE -Wno-shadow)
1010

1111
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
12-
target_compile_options(${TARGET} PRIVATE -Wno-shadow-field-in-constructor)
12+
target_compile_options(${TARGET} PRIVATE -field-in-constructor)
1313
endif()
1414
endif()

0 commit comments

Comments
 (0)