From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-x22d.google.com (mail-pg0-x22d.google.com [IPv6:2607:f8b0:400e:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8059081EB2 for ; Sat, 17 Dec 2016 19:05:38 -0800 (PST) Received: by mail-pg0-x22d.google.com with SMTP id f188so47511010pgc.3 for ; Sat, 17 Dec 2016 19:05:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=6TBjlbBA9VOnkwon8aujSPnIwS07fM5SXfxMu8w/Ffw=; b=de0NoEVg+NY/Ih+vkv33WmTA3SM5xqrbE9qA5DbI//KvF5u/dVPvzsezfaYY8h/SDR 8vsbV2kAkkE48fVJMFSPgqEbZ+Wszcsi98ncAqk+29x0QP4UT/L8fXXFkKe8Go/NrYec v76Iyk7J2l49QGJTU3XuFCBmeIFwutJwnm3AE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=6TBjlbBA9VOnkwon8aujSPnIwS07fM5SXfxMu8w/Ffw=; b=SFMCMocuxIyz3SEjD1YSKw7eL1sYpWwKpfpD12bGdKm2+eah7QGXWH7XBGLfaiYS3q CzhBU+twQ9YfYbwYWIi4RVYQu3s7qaWfMe94HqffteTQ0gkgn20CYqOrH6dwUecNJCyq duExgvHazn8zM4hW6n080gNAhgBCkQ4eakoLswlwINCfx+2jO3lt1Rl9AotCnzvUuLKA OrxM7Ub60lS2NjnrFg0wnzvvP1eyEtoQyiqRAuN8d+uY5k/ovuiuQaZ64CX5KEp/AAAb L+bJJTxGngx1syZ93e9lhhlDIb9EPjShX6c3pozQdSQ7dqwJNS39jp9kMSV6FrgA61i8 WT5Q== X-Gm-Message-State: AKaTC00Z0K6bB8edqkKN8Am/L4S+J0Fyl+plEWD2eWcKJxDkslNRDtZAFMKJ6vtqDTcsCGbF X-Received: by 10.99.253.85 with SMTP id m21mr18657684pgj.38.1482030338202; Sat, 17 Dec 2016 19:05:38 -0800 (PST) Received: from [10.229.36.249] ([119.145.15.121]) by smtp.gmail.com with ESMTPSA id c142sm21572447pfb.23.2016.12.17.19.05.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Dec 2016 19:05:37 -0800 (PST) To: Hao Wu , edk2-devel@lists.01.org References: <1481714811-12568-1-git-send-email-hao.a.wu@intel.com> Cc: Liming Gao , Ye Ting , Wu Jiaxin , Jiewen Yao , Michael D Kinney , Fu Siyuan From: Heyi Guo Message-ID: <4f73905a-ab73-4fe9-5bf9-beac154da7c5@linaro.org> Date: Sun, 18 Dec 2016 11:04:19 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1481714811-12568-1-git-send-email-hao.a.wu@intel.com> Subject: Re: [PATCH 0/6] Refine code logics to prevent possible mis-reports by static code checkers X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2016 03:05:38 -0000 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Hao, May I ask which static code checkers you are using? We are using Coverity and Fortify checkers, and there are hundreds of warnings reported. Do you have a plan to analyze and fix (some may be not real errors) the warnings from these two checkers? Thanks and regards, Heyi 在 12/14/2016 7:26 PM, Hao Wu 写道: > The series refines the loop logic (e.g. for, while) of some functions to > be more straightforward. This will help to prevent some possible > mis-reports by static code checkers > > Cc: Jiewen Yao > Cc: Liming Gao > Cc: Michael D Kinney > Cc: Fu Siyuan > Cc: Ye Ting > Cc: Wu Jiaxin > > Hao Wu (6): > MdePkg/BaseLib: Refine (Ascii)StrnLenS functions logic > MdePkg/BaseLib: Add an additional check within (Ascii)StrnCmp > MdePkg/MemoryLib: Refine InternalMemSetMem16|32|64 functions logic > MdeModulePkg/DxeNetLib: Rewrite NetblockChecksum function logic > MdeModulePkg/UefiPxeBcDxe: Refine the CvtNum function logic > NetworkPkg: Refine UintnToAscDecWithFormat functions logic > > MdeModulePkg/Library/DxeNetLib/NetBuffer.c | 16 ++++++++-------- > .../Universal/Network/UefiPxeBcDxe/PxeBcSupport.c | 5 ++--- > MdePkg/Library/BaseLib/SafeString.c | 16 ++++++++++++---- > MdePkg/Library/BaseLib/String.c | 4 +++- > MdePkg/Library/BaseMemoryLib/MemLibGeneric.c | 18 +++++++++--------- > MdePkg/Library/PeiMemoryLib/MemLibGeneric.c | 18 +++++++++--------- > MdePkg/Library/UefiMemoryLib/MemLibGeneric.c | 18 +++++++++--------- > NetworkPkg/HttpBootDxe/HttpBootSupport.c | 5 ++--- > NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c | 5 ++--- > 9 files changed, 56 insertions(+), 49 deletions(-) >