Quellcode durchsuchen

Fix unused parameters in server.cpp to silence clangd warnings

Fszontagh vor 3 Monaten
Ursprung
Commit
4204677fb0
1 geänderte Dateien mit 4 neuen und 11 gelöschten Zeilen
  1. 4 11
      src/server.cpp

+ 4 - 11
src/server.cpp

@@ -4380,8 +4380,7 @@ void Server::handleUnloadModelById(const httplib::Request& req, httplib::Respons
     }
 }
 
-void Server::handleModelTypes(const httplib::Request& req, httplib::Response& res) {
-    (void)req; // Suppress unused parameter warning
+void Server::handleModelTypes(const httplib::Request& /*req*/, httplib::Response& res) {
 
     std::string requestId = generateRequestId();
 
@@ -4452,8 +4451,7 @@ void Server::handleModelTypes(const httplib::Request& req, httplib::Response& re
     }
 }
 
-void Server::handleModelDirectories(const httplib::Request& req, httplib::Response& res) {
-    (void)req; // Suppress unused parameter warning
+void Server::handleModelDirectories(const httplib::Request& /*req*/, httplib::Response& res) {
 
     std::string requestId = generateRequestId();
 
@@ -4501,8 +4499,7 @@ void Server::handleModelDirectories(const httplib::Request& req, httplib::Respon
     }
 }
 
-void Server::handleRefreshModels(const httplib::Request& req, httplib::Response& res) {
-    (void)req; // Suppress unused parameter warning
+void Server::handleRefreshModels(const httplib::Request& /*req*/, httplib::Response& res) {
 
     std::string requestId = generateRequestId();
 
@@ -4669,8 +4666,7 @@ void Server::handleConvertModel(const httplib::Request& req, httplib::Response&
     }
 }
 
-void Server::handleModelStats(const httplib::Request& req, httplib::Response& res) {
-    (void)req; // Suppress unused parameter warning
+void Server::handleModelStats(const httplib::Request& /*req*/, httplib::Response& res) {
 
     std::string requestId = generateRequestId();
 
@@ -4939,9 +4935,6 @@ void Server::serverThreadFunction(const std::string& host, int port) {
         std::cout << "Port " << port << " is available, proceeding with server startup..." << std::endl;
         std::cout << "Calling listen()..." << std::endl;
 
-        // Set up a flag to track if listen started successfully
-        std::atomic<bool> listenStarted{false};
-
         // We need to set m_isRunning after successful bind but before blocking
         // cpp-httplib doesn't provide a callback, so we set it optimistically
         // and clear it if listen() returns false