From 26bad3021644315e27ef1ee43402de1dd1507eca Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 25 Jul 2019 15:30:08 +0300 Subject: warning fixes --- plugins/Scriver/src/msglog.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'plugins/Scriver/src/msglog.cpp') diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp index 85862fe33a..908a6269b1 100644 --- a/plugins/Scriver/src/msglog.cpp +++ b/plugins/Scriver/src/msglog.cpp @@ -97,14 +97,12 @@ int DbEventIsShown(DBEVENTINFO &dbei) { switch (dbei.eventType) { case EVENTTYPE_MESSAGE: + case EVENTTYPE_FILE: return 1; case EVENTTYPE_JABBER_CHATSTATES: case EVENTTYPE_JABBER_PRESENCE: return 0; - - case EVENTTYPE_FILE: - return 1; } return DbEventIsCustomForMsgWindow(&dbei); @@ -388,7 +386,7 @@ static void AppendWithCustomLinks(EventData *evt, int style, CMStringA &buf) BOOL isAnsii = (evt->dwFlags & IEEDF_UNICODE_TEXT) == 0; WCHAR *wText; - size_t len, laststart = 0; + size_t len; if (isAnsii) { len = mir_strlen(evt->pszText); wText = mir_a2u(evt->pszText); @@ -398,9 +396,9 @@ static void AppendWithCustomLinks(EventData *evt, int style, CMStringA &buf) len = (int)mir_wstrlen(evt->pszTextW); } - if (len - laststart > 0) { + if (len > 0) { buf.AppendFormat("%s ", SetToStyle(style)); - AppendUnicodeOrAnsiiToBufferL(buf, wText + laststart, len - laststart, isAnsii); + AppendUnicodeOrAnsiiToBufferL(buf, wText, len, isAnsii); } if (isAnsii) -- cgit v1.2.3