diff --git a/lib/Discovery_Schema.cpp b/lib/Discovery_Schema.cpp index 8c96620ad..06a80730e 100644 --- a/lib/Discovery_Schema.cpp +++ b/lib/Discovery_Schema.cpp @@ -13,15 +13,6 @@ using json = nlohmann::json; -// Helper function for current timestamp -static std::string now_iso() { - char buf[64]; - time_t now = time(NULL); - struct tm* tm_info = gmtime(&now); - strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%SZ", tm_info); - return std::string(buf); -} - Discovery_Schema::Discovery_Schema(const std::string& path) : db(NULL), db_path(path), mcp_rules_version(0) { diff --git a/lib/GenAI_Thread.cpp b/lib/GenAI_Thread.cpp index 0caac8d99..b7b2b5b05 100644 --- a/lib/GenAI_Thread.cpp +++ b/lib/GenAI_Thread.cpp @@ -973,8 +973,6 @@ GenAI_EmbeddingResult GenAI_Threads_Handler::call_llama_batch_embedding(const st headers = curl_slist_append(headers, "Content-Type: application/json"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); - // Perform request - auto start_time = std::chrono::steady_clock::now(); CURLcode res = curl_easy_perform(curl); if (res != CURLE_OK) { diff --git a/lib/MySQL_Monitor.cpp b/lib/MySQL_Monitor.cpp index 49139b120..3a363f11c 100644 --- a/lib/MySQL_Monitor.cpp +++ b/lib/MySQL_Monitor.cpp @@ -109,7 +109,7 @@ class ConsumerThread : public Thread { ConsumerThread(wqueue*>& queue, int _n, const char *thread_name=NULL) : m_queue(queue) { thrn=_n; if (thread_name && thread_name[0]) { - snprintf(thr_name, sizeof(thr_name), "%.16s", thread_name); + snprintf(thr_name, sizeof(thr_name), "%.15s", thread_name); } else { snprintf(thr_name, sizeof(thr_name), "%.12s%03d", typeid(T).name(), thrn); } diff --git a/lib/ProxySQL_Cluster.cpp b/lib/ProxySQL_Cluster.cpp index fda9b4ade..b9b9547da 100644 --- a/lib/ProxySQL_Cluster.cpp +++ b/lib/ProxySQL_Cluster.cpp @@ -122,7 +122,7 @@ static char *NODE_COMPUTE_DELIMITER=(char *)"-gtyw23a-"; // a random string used * * @return Returns true if allocation succeeded, false on memory allocation failure */ -static bool safe_update_peer_info(char** existing_hostname, char** existing_ip_addr, +static bool __attribute__((unused)) safe_update_peer_info(char** existing_hostname, char** existing_ip_addr, const char* new_hostname, const char* new_ip_addr) { // Free existing allocations if (*existing_hostname) {