mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-19 17:43:35 -04:00
Description:fix warning bug
Match-id-d041b6714afa1154076b4af65b717ce973e3ecac
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user