Skip to content

Commit a59ee7c

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

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
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;

0 commit comments

Comments
 (0)