浏览代码

common : fix noreturn compile warning (#13151)

ggml-ci
Georgi Gerganov 9 月之前
父节点
当前提交
43f2b07193
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      common/arg.cpp

+ 6 - 2
common/arg.cpp

@@ -673,8 +673,12 @@ static struct common_hf_file_res common_get_hf_file(const std::string &, const s
     return {};
 }
 
-std::pair<long, std::vector<char>> common_remote_get_content(const std::string &, const common_remote_params &) {
-    throw std::runtime_error("error: built without CURL, cannot download model from the internet");
+std::pair<long, std::vector<char>> common_remote_get_content(const std::string & url, const common_remote_params &) {
+    if (!url.empty()) {
+        throw std::runtime_error("error: built without CURL, cannot download model from the internet");
+    }
+
+    return {};
 }
 
 #endif // LLAMA_USE_CURL