From patchwork Wed Jul 26 18:58:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 108790 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1148428qge; Wed, 26 Jul 2017 11:59:30 -0700 (PDT) X-Received: by 10.99.44.76 with SMTP id s73mr1745708pgs.396.1501095570107; Wed, 26 Jul 2017 11:59:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501095570; cv=none; d=google.com; s=arc-20160816; b=lKTZ2OLVgZb0IEud1mH5dcCh8wXfPFmq1lN015P6KooFbnBPji92ORIGlixHoRgnaw CkNyAO5qfcAp57QYOaeF++NuqYdvpHtZzYKTLW8f5iD17/tHT0aIwqLcrqgMEcmscxJl 2bCBVL1T9VIfJ5jd9VbfqmwQsxneYZ49xY9cWKdNfhEfhTd9D98FCGJnms0BcJvM+VPT RVRe0KboUmQTTT0nZjAZXbXm36CQiRrwOpzIlaElgVzrxB/Mt6VQDhoJHHuHcoSeS7Lj YlzbHIQUCUhylUSmGFmGO95DrJQQxkAiTiJklOhpLs/xxUvXNsj7hPk5vOz4zupL8RmZ bEJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=kD1FggX8O2Eh8/zQnbnT8tdmJ7gr/BFjmQ893UBTft4=; b=NklSu/YAEzlxszG9CH2fUkqqFX9MtghJJyXDrWAJozeZJ0xTDv1pWqhJ7F3mKx80sT ltqUJA3TSUok2oRLryQCN760Jhy25KEpALW3XnU8illpnN2jOFE9Wd3BlynvsaUGT9B0 22zt67DoeFsPjRiae5qMuU8NXWBjBSHIeQogUfB/nli3aooAc0GDXnPN97+stm5VZ4oZ aqmhBV+9UWfE+78VZ2s+V0Wy4A1W2iHYUjHW97ohbbJphOu29fXKa38BDSUOQPds7mc9 ErfWhv27C+7ySS+r62T5RuD2uKM2gt2CUqfTIE2v6NMerCiDn5So5YKcLt+i7R3E8MM7 0jNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=bN7v10Aa; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id o12si9834753pfa.545.2017.07.26.11.59.29; Wed, 26 Jul 2017 11:59:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=bN7v10Aa; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 596737825A; Wed, 26 Jul 2017 18:58:55 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by mail.openembedded.org (Postfix) with ESMTP id 5BABA719A8 for ; Wed, 26 Jul 2017 18:58:35 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id y25so8736725pfk.4 for ; Wed, 26 Jul 2017 11:58:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tA5xf36b7eZU93oJfKaJJOpCpI5oNeopVpJx3tmJU40=; b=bN7v10Aa/c2Wh8Dt2/HVSsTjD8CWCxIOjcRBt84k1VkcvVZ1Bg/3fNI9dRPy1pnoXd QMtH1de+4Uk5VwzZjotUYrTIH4gRnkZxGh9redeqRvR5wAzIUEN97vkDIDQeVmVaLxqZ +J99yHBlvr2QOR7RhI2mTvrVvTCn3RS5Ru8wcGbDQYP0fzzEpbTbyC6JnR6uX+KE11KG Xi3uMiQbkQzDzCwoWDtVBig7w1ndDhUmW+NoDJ6a8Ijdvrk+ua2VhJxTSolH5dGCs8lA NqrsIJzmKNg3xi1cZtLS8WKNzAK2NLlv7QPg3RgLk1XjGKHSOb5ultA3iYJi53OlHvTM cFHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tA5xf36b7eZU93oJfKaJJOpCpI5oNeopVpJx3tmJU40=; b=Veq3TalyjMjrn9GuNDxlEd3BdSq+MCIGvxsWX9cCX3bTJ6s7nIbFYjj8JqNWO6WWdx N8hYDwtTGhfG5xzlyFxVLKzfQlgbuWQF6JkP58KpFZFZRVCAEV03nHbzpXtZZYT0jsgN XGj8sSgrOaKC/fXXwW5ZpZrBAof+0jEOfyT3s1BGX44u58Y+dqfopuowAUswe1q2yyaI QcrI9fuc1kgAS2leOJsFb4QKl+spcheY3xuVBsNJLV6nU548d56YKmIiZ7u1FMUA14aA i/hpstD0cgxIUbsFmxppho6tnZeN3dq5vXq8hX7SUlXm60SpAG9xMC72tby8qnK5XdpS n2gA== X-Gm-Message-State: AIVw110KBE4rnKF+Zjtoi5tJwZvrPUuzNXK6WUmE78+XSam1X58465oQ e4WhJGiRfTGGizTq X-Received: by 10.98.206.194 with SMTP id y185mr1776179pfg.312.1501095517074; Wed, 26 Jul 2017 11:58:37 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::9b53]) by smtp.gmail.com with ESMTPSA id s15sm33245864pfk.42.2017.07.26.11.58.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Jul 2017 11:58:35 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Wed, 26 Jul 2017 11:58:14 -0700 Message-Id: <20170726185815.8898-6-raj.khem@gmail.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170726185815.8898-1-raj.khem@gmail.com> References: <20170726185815.8898-1-raj.khem@gmail.com> Subject: [oe] [meta-oe][PATCH 6/7] ssiapi: Fix build errors found with clang X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- ...itor-ordered-comparison-between-pointers-.patch | 39 ++++++++++++++++++++++ meta-oe/recipes-support/ssiapi/ssiapi_1.0.1.bb | 3 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-support/ssiapi/ssiapi/0001-ssieventmonitor-ordered-comparison-between-pointers-.patch -- 2.13.3 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-support/ssiapi/ssiapi/0001-ssieventmonitor-ordered-comparison-between-pointers-.patch b/meta-oe/recipes-support/ssiapi/ssiapi/0001-ssieventmonitor-ordered-comparison-between-pointers-.patch new file mode 100644 index 000000000..27df9b5de --- /dev/null +++ b/meta-oe/recipes-support/ssiapi/ssiapi/0001-ssieventmonitor-ordered-comparison-between-pointers-.patch @@ -0,0 +1,39 @@ +From ea9ecf4bf305f9509d5822b3823658a40162f43c Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 25 Jul 2017 19:08:21 -0700 +Subject: [PATCH] ssieventmonitor: ordered comparison between pointers and + zero, actually with NULL + +Comparing which is large or small between a pointer and NULL +however, looks completely illogical. Ordered comparison of +two valid pointers is legit, but no pointer will be smaller +than NULL , so comparing if a pointer is larger than NULL +simply means if the pointer is not NULL. + +Fixes errors found with clang e.g. + +| ssieventmonitor.cpp:339:53: error: ordered comparison between pointer and zero ('char *' and 'int') +| if (fgets(nextline, sizeof(nextline) - 1, mdstat) < 0) { +| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ + +Signed-off-by: Khem Raj +--- + tools/ssieventmonitor.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/ssieventmonitor.cpp b/tools/ssieventmonitor.cpp +index f04b8f0..7a00122 100644 +--- a/tools/ssieventmonitor.cpp ++++ b/tools/ssieventmonitor.cpp +@@ -336,7 +336,7 @@ static int _read_mdstat(int fd) + if (!strncmp(line, "md", 2)) { + if (strstr(line, INACTIVE_STR)) { /* possibly container */ + char nextline[1024]; +- if (fgets(nextline, sizeof(nextline) - 1, mdstat) < 0) { ++ if (fgets(nextline, sizeof(nextline) - 1, mdstat) != (char *) NULL) { + fclose(mdstat); + return 1; + } +-- +2.13.3 + diff --git a/meta-oe/recipes-support/ssiapi/ssiapi_1.0.1.bb b/meta-oe/recipes-support/ssiapi/ssiapi_1.0.1.bb index 339637087..5eb4696b5 100644 --- a/meta-oe/recipes-support/ssiapi/ssiapi_1.0.1.bb +++ b/meta-oe/recipes-support/ssiapi/ssiapi_1.0.1.bb @@ -18,7 +18,8 @@ SRC_URI = "http://sourceforge.net/projects/irstessi/files/${BPN}.${PV}.tgz \ file://0005-engine-Define-SENTINEL.patch \ file://0006-tools-Add-missing-includes-and-use-realpath-instead-.patch \ file://configure-cflags.patch \ -" + file://0001-ssieventmonitor-ordered-comparison-between-pointers-.patch \ + " SRC_URI[md5sum] = "02f16d7cbd30d28034093212906591f5" SRC_URI[sha256sum] = "e10d283b0f211afb8ebd0bde87c097769613d30a052cdf164753e35e803264c7"