fanyang commited on
Commit
0454008
·
1 Parent(s): feee739

build : suppress gcc15 compile warnings (llama/14261)

Browse files

* Change _contains_any() substrs to std::string_view and fix the find comparison logic.

Files changed (1) hide show
  1. ggml/src/ggml-backend-reg.cpp +5 -0
ggml/src/ggml-backend-reg.cpp CHANGED
@@ -69,6 +69,9 @@
69
  #if defined(__clang__)
70
  # pragma clang diagnostic push
71
  # pragma clang diagnostic ignored "-Wdeprecated-declarations"
 
 
 
72
  #endif
73
 
74
  namespace fs = std::filesystem;
@@ -91,6 +94,8 @@ static std::string path_str(const fs::path & path) {
91
 
92
  #if defined(__clang__)
93
  # pragma clang diagnostic pop
 
 
94
  #endif
95
 
96
  #ifdef _WIN32
 
69
  #if defined(__clang__)
70
  # pragma clang diagnostic push
71
  # pragma clang diagnostic ignored "-Wdeprecated-declarations"
72
+ #elif defined(__GNUC__)
73
+ # pragma GCC diagnostic push
74
+ # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
75
  #endif
76
 
77
  namespace fs = std::filesystem;
 
94
 
95
  #if defined(__clang__)
96
  # pragma clang diagnostic pop
97
+ #elif defined(__GNUC__)
98
+ # pragma GCC diagnostic pop
99
  #endif
100
 
101
  #ifdef _WIN32