From 0f932b4a50a2322bd1e8f69da8633e1f94de6aad Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 9 Jun 2024 20:14:47 +0300 Subject: warning fix --- protocols/SkypeWeb/src/skype_profile.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/protocols/SkypeWeb/src/skype_profile.cpp b/protocols/SkypeWeb/src/skype_profile.cpp index ee010b9444..34c656dc14 100644 --- a/protocols/SkypeWeb/src/skype_profile.cpp +++ b/protocols/SkypeWeb/src/skype_profile.cpp @@ -240,16 +240,16 @@ void CSkypeProto::UpdateProfileBirthday(const JSONNode &root, MCONTACT hContact) CMStringW birthday = root["birthday"].as_mstring(); if (!birthday.IsEmpty() && birthday != "null") { int d, m, y; - swscanf(birthday.GetBuffer(), L"%d-%d-%d", &y, &m, &d); - setWord(hContact, "BirthYear", y); - setByte(hContact, "BirthDay", d); - setByte(hContact, "BirthMonth", m); - } - else { - delSetting(hContact, "BirthYear"); - delSetting(hContact, "BirthDay"); - delSetting(hContact, "BirthMonth"); + if (3 == swscanf(birthday.GetBuffer(), L"%d-%d-%d", &y, &m, &d)) { + setWord(hContact, "BirthYear", y); + setByte(hContact, "BirthDay", d); + setByte(hContact, "BirthMonth", m); + } } + + delSetting(hContact, "BirthYear"); + delSetting(hContact, "BirthDay"); + delSetting(hContact, "BirthMonth"); } void CSkypeProto::UpdateProfileCountry(const JSONNode &root, MCONTACT hContact) @@ -276,7 +276,7 @@ void CSkypeProto::UpdateProfileEmails(const JSONNode &root, MCONTACT hContact) const JSONNode &node = root["emails"]; if (node) { const JSONNode &items = node.as_array(); - for (size_t i = 0; i < min(items.size(), 3); i++) { + for (int i = 0; i < min(items.size(), 3); i++) { const JSONNode &item = items.at(i); if (!item) break; -- cgit v1.2.3