From ac53e5e2029cc31c819c0fa77e17959bf9dd1b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E5=AE=A3=E6=AD=A3?= Date: Wed, 10 Nov 2021 16:57:44 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=88=20style(hos=5Fclient.cpp):=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=BC=E5=BC=8F=E5=8C=96=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hos_client.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hos_client.cpp b/src/hos_client.cpp index 33e15e50..5fea17bc 100644 --- a/src/hos_client.cpp +++ b/src/hos_client.cpp @@ -448,7 +448,7 @@ static void hos_client_create() //初始化 char endpoint[128]; - snprintf(endpoint, 128, "http://%s:%d/hos/", hos_conf->ip, hos_conf->port); + snprintf(endpoint, 128, "http://%s:%u/hos/", hos_conf->ip, hos_conf->port); g_client_config->endpointOverride.append(endpoint); g_client_config->verifySSL = false; g_client_config->enableEndpointDiscovery = true; @@ -543,7 +543,7 @@ static int hos_putobject_async(Aws::S3::Model::PutObjectRequest& request, size_t //设置回调函数 std::shared_ptr context = Aws::MakeShared(""); - sprintf(buf, "%lu %lu %lu", thread_id, (long)*fd, stream_len); + sprintf(buf, "%lu %lu %lu", thread_id, (size_t)*fd, stream_len); context->SetUUID(buf); if (hos_conf->max_request_num && hos_conf->max_request_context && @@ -683,7 +683,7 @@ hos_instance hos_init_instance(const char *conf_path, const char *module, size_t { g_hos_instance.error_code = HOS_PARAMETER_ERROR; snprintf(g_hos_instance.error_message, HOS_ERROR_MESSAGE_SIZE, - "param error:conf_path:%s, module:%s, thread_num:%lu", conf_path, module, thread_num); + "param error:conf_path:%s, module:%s, thread_num:%lu", (conf_path?conf_path:"NULL"), (module?(module:"NULL")), thread_num); return NULL; }