diff options
author | George Hazan <george.hazan@gmail.com> | 2024-06-09 20:14:47 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-06-09 20:14:47 +0300 |
commit | 0f932b4a50a2322bd1e8f69da8633e1f94de6aad (patch) | |
tree | 0870f251db2656f6ee049b22ee45b27bd9ba6ea5 /protocols/SkypeWeb/src/skype_profile.cpp | |
parent | c06dccf6a1e120c488065eabb15e8ba584ae93ce (diff) |
warning fix
Diffstat (limited to 'protocols/SkypeWeb/src/skype_profile.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_profile.cpp | 20 |
1 files 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;
|