From 808cc3cd50a8d22bfe12c422e9541ca30454db32 Mon Sep 17 00:00:00 2001 From: Murai Takashi Date: Mon, 7 Jan 2019 20:29:06 +0900 Subject: [PATCH] mail: Fix PVS 962 * Remove cast to void* in AddItem() at line 775, so that avoid that the object which was created using 'new' operator is immediately cast to another type. Change-Id: I0722661611d0393896c1aac161a702a4c2f1d5d8 Reviewed-on: https://review.haiku-os.org/c/857 Reviewed-by: Barrett17 --- src/apps/mail/Words.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/mail/Words.cpp b/src/apps/mail/Words.cpp index 3bc987d979..f2b8244432 100644 --- a/src/apps/mail/Words.cpp +++ b/src/apps/mail/Words.cpp @@ -772,7 +772,7 @@ Words::FindBestMatches(BList* matches, const char* s) && word_match(gCmpKey, testWord) <= int32(float(strlen(gCmpKey)-1)*.75)) { // printf("Added: %s\n", testWord); - matches->AddItem((void*)(new BString(testWord))); + matches->AddItem(new BString(testWord)); } // If suffix, transform and test