From a59ee7c4eb3efa39718af405dc1fad43bdca6dce Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sun, 12 Jan 2025 16:19:18 +0200 Subject: [PATCH] common : cont ggml-ci --- cmake/common.cmake | 2 +- common/common.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/common.cmake b/cmake/common.cmake index 45bac7af8..5a39cbf78 100644 --- a/cmake/common.cmake +++ b/cmake/common.cmake @@ -19,7 +19,7 @@ function(llama_add_compile_flags) list(APPEND CXX_FLAGS -Wshadow) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - list(APPEND CXX_FLAGS -Wshadow -Wshadow-field-in-constructor) + list(APPEND CXX_FLAGS -Wshadow-field-in-constructor) endif() endif() diff --git a/common/common.cpp b/common/common.cpp index 16cc3f41c..447fb03ea 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -1208,7 +1208,7 @@ static bool common_download_file(const std::string & url, const std::string & pa { typedef size_t(*CURLOPT_HEADERFUNCTION_PTR)(char *, size_t, size_t, void *); auto header_callback = [](char * buffer, size_t /*size*/, size_t n_items, void * userdata) -> size_t { - common_load_model_from_url_headers * headers = (common_load_model_from_url_headers *) userdata; + common_load_model_from_url_headers * cur = (common_load_model_from_url_headers *) userdata; static std::regex header_regex("([^:]+): (.*)\r\n"); 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 const std::string & key = match[1]; const std::string & value = match[2]; if (std::regex_match(key, match, etag_regex)) { - headers->etag = value; + cur->etag = value; } else if (std::regex_match(key, match, last_modified_regex)) { - headers->last_modified = value; + cur->last_modified = value; } } return n_items;