Description:fix warning bug

Match-id-d041b6714afa1154076b4af65b717ce973e3ecac
This commit is contained in:
xxxx
2022-07-04 12:04:41 +08:00
parent b57a3fd53b
commit fc90140a1c
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -588,7 +588,7 @@ std::string InputHub::StringPrintf(const char* format, ...) const
va_list ap;
va_start(ap, format);
std::string result;
int ret = vsnprintf_s(space, sizeof(space), sizeof(space) - 1, format, ap);
size_t ret = vsnprintf_s(space, sizeof(space), sizeof(space) - 1, format, ap);
if (ret >= DH_SUCCESS && ret < sizeof(space)) {
result = space;
} else {
+1 -1
View File
@@ -189,7 +189,7 @@ void WhiteListUtil::GetCombKeysHash(TYPE_COMBINATION_KEY_VEC combKeys, std::unor
void WhiteListUtil::GetAllComb(TYPE_COMBINATION_KEY_VEC vecs, WhiteListItemHash hash,
int32_t targetLen, std::unordered_set<std::string> &hashSets)
{
for (int32_t i = 0; i < vecs.size(); i++) {
for (size_t i = 0; i < vecs.size(); i++) {
TYPE_KEY_CODE_VEC nowVec = vecs[i];
for (int32_t code : nowVec) {
WhiteListItemHash newHash = { hash.hash + std::to_string(code), hash.len + 1 };
@@ -33,7 +33,7 @@
namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
DistributedInputCollector::DistributedInputCollector() : mEventBuffer{0x00}, collectThreadID_(-1),
DistributedInputCollector::DistributedInputCollector() : mEventBuffer{}, collectThreadID_(-1),
isCollectingEvents_(false), isStartGetDeviceHandlerThread(false), inputTypes_(0)
{
inputHub_ = std::make_unique<InputHub>();