diff --git a/hdf_service/distributed_audio/mfc_test/distributedaudiotest.cpp b/hdf_service/distributed_audio/mfc_test/distributedaudiotest.cpp index de2c73065f999024665ba945a8310ecc0a7b93d0..e933d5563cf755054ee167273f27c63c49fcf990 100644 --- a/hdf_service/distributed_audio/mfc_test/distributedaudiotest.cpp +++ b/hdf_service/distributed_audio/mfc_test/distributedaudiotest.cpp @@ -628,11 +628,11 @@ void HandleAudioEvent(const std::string& cmd, std::string& cmdResString, struct } } -int GenerateFifoName(int& clientFd, char clientFifo[], struct Response& resp, +static int GenerateFifoName(int& clientFd, char clientFifo[], struct Response& resp, std::string& cmdResString, struct Request& req) { if (snprintf_s(clientFifo, CLIENT_FIFO_NAME_LEN, CLIENT_FIFO_NAME_LEN, - CLIENT_FIFO_TEMPLATE.c_str(), (long)(req.pid)) < 0) { + CLIENT_FIFO_TEMPLATE.c_str(), static_cast(req.pid)) < 0) { return -1; } clientFd = open(clientFifo, O_WRONLY);