From patchwork Fri Mar 8 06:02:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 159949 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp8317262jad; Thu, 7 Mar 2019 22:02:34 -0800 (PST) X-Google-Smtp-Source: APXvYqwPhv1OAk0OTm3r8cZlvUeAzy13ESBHzcIIZVFpVykUsueVPS9CVDbbiXSukgOnaQ8VA8+D X-Received: by 2002:a62:e0ca:: with SMTP id d71mr16565089pfm.62.1552024953962; Thu, 07 Mar 2019 22:02:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552024953; cv=none; d=google.com; s=arc-20160816; b=1IfRI0PahplroEJLhGX/06DI3yEaFPeTFdfC49WoDdaoAJSAXTbmYUd5xL/inRzJql lzIr7063VnyXo7dzAWHPNRMTkOI89IsHd5ei4AP9A2J6nm3aj7xYFGbSywX4aEidYmYj jJSGfnJQkRU96WLijZjKgcU+S3cWrOAnojUgl2GP5ZK8/ebEPfUYWkJBrTF3HI882h9K JxSvc/MeiG/LPZi9vfInNRlQWcgVEhquDiOnJEMz1p9YejXqc1TIKesBrWLpGNMYSllJ adgPdBBHWoS+KO0pGTQe5jm6Vz0MPAsgnRsnbQ7WTB+bm9ig/EiIDr41RG1XisMZ9oPm 1A3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=cY25TZuu7UZ2+g5LoOjH16R/nOZFs24jxF6SOUEWzx0=; b=SIKECcReEePoIgGKKnlM+bPhKnZDvWwujO28sTPaPBKHyizo6Kmcr34pdcTHcpE191 PYNMow0xjQqOaBxSesacst6kQgPtj5h1jnC73UUIsu06Osr9Wf1SfdsNwLhqFy/oxlfv SHPLZqrc+lq93eUJPhB9fW9iO1leMkeDf70FtVtxFvipZNr3mp3ONzcTZlScevXOZjr2 99BuXe1L7K2bjJ2CwMDAYQUeWfiuC4vJAjHAM9uxSqzaBTfQiRElEHuVJAFV3kjOcAqN JFJJvYpzzlnQ3xhckaQDKpBb+FZ9xYpa8/z7lV7WFWfhsgkr2bWZyqdFd3zPGT6piWpx nMLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=BcjkZQkG; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE 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 39si1609238plc.66.2019.03.07.22.02.33; Thu, 07 Mar 2019 22:02:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-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.s=20161025 header.b=BcjkZQkG; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id A66617CE54; Fri, 8 Mar 2019 06:02:27 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by mail.openembedded.org (Postfix) with ESMTP id 30CA57CB31 for ; Fri, 8 Mar 2019 06:02:25 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id r124so13261537pgr.3 for ; Thu, 07 Mar 2019 22:02:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wEkHFIciOzG9yk0AvBC0qcb/eAd+AwxzfgSzAMIT4hw=; b=BcjkZQkG66nwDsj0JDZGwIrIQgRWctus47FhdWxKQvkQ3cvfsSBsJNAwEQac5xA7Kt 1q2EZwIJUlAhvvKbZgtjjA7W47Z9qqwwSMj5aE+r1ov4FqpDHOD7i9llU4ZcK0V939dA syIs7V04XJLZrkd6PCrIGgDZM3P3QDmjsoNVK2EiCOZ+s7nK8lcUNvC2BlSBKL/5BBxc KmPkyrXcFxDFGEdY8uVmgDdercSfK3gE88j3Tq0gzlnFrDl/j8C0g0NhLAv7TqIKh8ol IlL32eGQtSNCEjeoy0cvXgWssqzFyiUQ4pP+z2iLFnCw2uo+1JZetAwbUtPSnzGBmZFk L70g== 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:mime-version :content-transfer-encoding; bh=wEkHFIciOzG9yk0AvBC0qcb/eAd+AwxzfgSzAMIT4hw=; b=V2c3gaZP6Vx8P4SwzkUxcr99upNS2B5R18voW3bie0GLk6gZuWDBows/sB+e4YslO3 Uudxikm7KUstmD1ngGCfT+d5nJEpDasjk1K0ZPc43kmiN76dtrVnOjp/USuXRy34Najq Pjprx6PKyA3435Uwb75jxUcjV2ukhmByUrjDV4qxEy25FBbY0ervAVioPixnm7TbkL1d jwQiC7uBA60DsmZv9pf2Q2K0p1Y/fIokZ0mY0yaqi3JUwlwILiUu6O5wLCS+To5fEUOs Kt1YvD4EEbYWZzvcUCnjQBGWMX3cMDoyphXP7P4Z/pydFvwPDwuxydoJYYYRO2w+uW// rY/g== X-Gm-Message-State: APjAAAXm/HNi3P1byVEbTzgy0r5Vn110KhvXMY1gH0SkRs+STrlbpPVW i2kMrhI3WU6v6j3LenDHMsGBtPzC X-Received: by 2002:a65:5281:: with SMTP id y1mr15409703pgp.59.1552024945030; Thu, 07 Mar 2019 22:02:25 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8500:6bc6::3401]) by smtp.gmail.com with ESMTPSA id m3sm7851246pgp.85.2019.03.07.22.02.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Mar 2019 22:02:24 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Thu, 7 Mar 2019 22:02:16 -0800 Message-Id: <20190308060216.21801-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [OE-core] [PATCH] puzzles: Fix build with gcc9 on risc-v X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- ...-string-lenght-parameter-to-be-size_.patch | 33 +++++++++++++++++++ meta/recipes-sato/puzzles/puzzles_git.bb | 1 + 2 files changed, 34 insertions(+) create mode 100644 meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch -- 2.21.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch b/meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch new file mode 100644 index 0000000000..9ac62015d8 --- /dev/null +++ b/meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch @@ -0,0 +1,33 @@ +From 035467aa0abfbc0de7e5d24543d4aab37301593c Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 7 Mar 2019 21:56:57 -0800 +Subject: [PATCH] pattern.c: Change string lenght parameter to be size_t in + do_row() + +This fixes below error on some architectures e.g. RISC-V + +pattern.c:455:9: error: 'memset' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] 455 | memset(deduced, DOT, (size_t)len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + pattern.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pattern.c b/pattern.c +index 45b1b0c..f73a4c2 100644 +--- a/pattern.c ++++ b/pattern.c +@@ -428,7 +428,7 @@ static int do_row(unsigned char *known, unsigned char *deduced, + unsigned char *row, + unsigned char *minpos_done, unsigned char *maxpos_done, + unsigned char *minpos_ok, unsigned char *maxpos_ok, +- unsigned char *start, int len, int step, int *data, ++ unsigned char *start, size_t len, int step, int *data, + unsigned int *changed + #ifdef STANDALONE_SOLVER + , const char *rowcol, int index, int cluewid +-- +2.21.0 + diff --git a/meta/recipes-sato/puzzles/puzzles_git.bb b/meta/recipes-sato/puzzles/puzzles_git.bb index 7d08b964f8..0766bd4ff1 100644 --- a/meta/recipes-sato/puzzles/puzzles_git.bb +++ b/meta/recipes-sato/puzzles/puzzles_git.bb @@ -13,6 +13,7 @@ SRC_URI = "git://git.tartarus.org/simon/puzzles.git \ file://0001-Use-labs-instead-of-abs.patch \ file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \ file://0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch \ + file://0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch \ " UPSTREAM_CHECK_COMMITS = "1"