From nobody Mon Apr 29 20:50:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1511325860140274.0496954318576; Tue, 21 Nov 2017 20:44:20 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id CBEE821C913BB; Tue, 21 Nov 2017 20:40:02 -0800 (PST) Received: from smtp.nue.novell.com (smtp.nue.novell.com [195.135.221.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 140A521C913B2 for ; Tue, 21 Nov 2017 20:40:01 -0800 (PST) Received: from localhost.localdomain (unknown.telstraglobal.net [134.159.103.118]) by smtp.nue.novell.com with ESMTP (NOT encrypted); Wed, 22 Nov 2017 05:44:14 +0100 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=195.135.221.5; helo=smtp.nue.novell.com; envelope-from=glin@suse.com; receiver=edk2-devel@lists.01.org From: Gary Lin To: edk2-devel@lists.01.org Date: Wed, 22 Nov 2017 12:43:56 +0800 Message-Id: <20171122044356.10258-1-glin@suse.com> X-Mailer: git-send-email 2.15.0 Subject: [edk2] [PATCH] CryptoPkg/IntrinsicLib: Fix the warning on memset X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ting Ye , Qin Long MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Gcc issued the warning when compiling CryptoPkg: CryptoPkg/Library/Include/CrtLibSupport.h:135:17: warning: type of 'memset'= does not match original declaration [-Wlto-type-mismatch] void *memset (void *, int, size_t); ^ CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c:27:8: note: type mismatch= in parameter 2 void * memset (void *dest, char ch, size_t count) ^ This commit changes the type of ch from char to int to match the declaration. Cc: Qin Long Cc: Ting Ye Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Gary Lin Reviewed-by: Long Qin --- CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c b/CryptoPkg/= Library/IntrinsicLib/MemoryIntrinsics.c index bf485d680d..e095f9aa0d 100644 --- a/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c +++ b/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c @@ -24,7 +24,7 @@ typedef UINTN size_t; int _fltused =3D 1; =20 /* Sets buffers to a specified character */ -void * memset (void *dest, char ch, size_t count) +void * memset (void *dest, int ch, size_t count) { // // NOTE: Here we use one base implementation for memset, instead of the = direct @@ -42,7 +42,7 @@ void * memset (void *dest, char ch, size_t count) =20 Pointer =3D (UINT8 *)dest; while (count-- !=3D 0) { - *(Pointer++) =3D ch; + *(Pointer++) =3D (UINT8)ch; } =20 return dest; --=20 2.15.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel