From patchwork Mon Mar 18 15:36:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vadym Kochan X-Patchwork-Id: 1057908 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="BvY189Cu"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44NL0D1lFVz9sBV for ; Tue, 19 Mar 2019 02:37:16 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A835985FA3; Mon, 18 Mar 2019 15:37:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B2GJl-kw8KhH; Mon, 18 Mar 2019 15:37:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0BC2F865A9; Mon, 18 Mar 2019 15:37:13 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 6C2681BF95D for ; Mon, 18 Mar 2019 15:37:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6941A252A8 for ; Mon, 18 Mar 2019 15:37:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kEEkwEKXhVkS for ; Mon, 18 Mar 2019 15:37:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by silver.osuosl.org (Postfix) with ESMTPS id CCC962206E for ; Mon, 18 Mar 2019 15:37:09 +0000 (UTC) Received: by mail-lf1-f49.google.com with SMTP id y62so3955107lfc.13 for ; Mon, 18 Mar 2019 08:37:09 -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:mime-version :content-transfer-encoding; bh=mYYD6qhRo9JOxAPa7rjxWT2iPyQkJnNn1Xk6ZAOFtsU=; b=BvY189Cuska1lcK5wj3NQiOG7oaaZfTGf4iiTEiW4hoRtex8OfFBBLDcMAj8PKbjXo gCo4LARf+Dok2VFWHqFfIjGN6mgSCSdsRHnJyxy7avMC6NjKA06GH33AQRPRME9vYQKg /0jwv4l901BEFfjC0Qtesv4lUWh+d6uIcS48wD+9IxWX4RYOBXOXaQ/ATi5cC0Dnr3iK uHh0IW9AmxlB6JqYKsgbqqHn6KhEaZeDyTkqHrq3fsMFrZKSc5MDdfsaRYJQS59M2/s5 ngfjnU4wlISU4QqC0t+i9I0Yf+9tHKN1kP3ypGKehIIjbkHO3+jPktiLdlVyT+SpSNHo djug== 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=mYYD6qhRo9JOxAPa7rjxWT2iPyQkJnNn1Xk6ZAOFtsU=; b=RK7SO7R7uWVUtyFj1TVZjtxyxlUSb7toTR68AjHUSMaEnefy00doDcT80svMu5uEJi +0YJFMdy0THM2ThX/LVb3dvumBYKHWJcwTvO6qb4M0VhHJvwrBESD1PqYbN/Nt5ti1Sj 5MoCfr/rT4OezDyBWCwP1/vM+fBQpxIQlUt6u9yWyWX7Ut7ZvtVzKt6kTyYUiVHhSw0P oo8QrkqvDerBRmsMmtI5r9PYhwBTjng7dtXVImaI6PoYNLzsN4hsh5gXS6aW7W+qYHd2 AB6LApjUQV05CORowPRryw+F3OAlWEnE0iMyt8kSQh14URE5RfMahq/2c+dMjQF0FjNz QrHg== X-Gm-Message-State: APjAAAUmMNgCoQC1/lJ+G3F0jAwRq3JxA2s5iG2YC4h+iiSahfmNB1q8 4AeUcTlv9ekagf8AN01A8Y3Z6gla X-Google-Smtp-Source: APXvYqxCWWkIVHE6vjdjsCJ1nzqTHTFJfhWljb0vDfiDcXeu8m0g4wSA9rl1rvjrfTKE1uDviWLNnQ== X-Received: by 2002:a19:f615:: with SMTP id x21mr10857806lfe.16.1552923426866; Mon, 18 Mar 2019 08:37:06 -0700 (PDT) Received: from lwo1-lhp-f71841.synapse.com ([195.234.74.207]) by smtp.gmail.com with ESMTPSA id g79sm519495lje.25.2019.03.18.08.37.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Mar 2019 08:37:06 -0700 (PDT) From: Vadim Kochan X-Google-Original-From: Vadim Kochan To: buildroot@buildroot.org Date: Mon, 18 Mar 2019 17:36:58 +0200 Message-Id: <1552923418-22447-1-git-send-email-email@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/uboot-tools: Fix loop positional declaration build error X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Kochan Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Vadim Kochan Move 'i' variable outside of the 'for' loop to separate declaration in lib/crc16.c Fixes: http://autobuild.buildroot.net/results/332c9d2232c03440bf71794ee7850b1f6fd51d11/ Signed-off-by: Vadim Kochan --- ...04-lib-crc16-Fix-loop-initial-declaration.patch | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 package/uboot-tools/0004-lib-crc16-Fix-loop-initial-declaration.patch diff --git a/package/uboot-tools/0004-lib-crc16-Fix-loop-initial-declaration.patch b/package/uboot-tools/0004-lib-crc16-Fix-loop-initial-declaration.patch new file mode 100644 index 0000000..65b4c2f --- /dev/null +++ b/package/uboot-tools/0004-lib-crc16-Fix-loop-initial-declaration.patch @@ -0,0 +1,38 @@ +From 1f6e30d11d7f58b028e42291e112cd44fbdcdbe9 Mon Sep 17 00:00:00 2001 +From: Vadim Kochan +Date: Mon, 18 Mar 2019 17:26:36 +0200 +Subject: [PATCH] lib/crc16: Fix loop initial declaration +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fix build error: + + ./tools/../lib/crc16.c:70:2: error: ‘for’ loop initial declarations are + only allowed in C99 or C11 mode + +by moving 'i' variable from 'for' loop to separate declaration. + +Signed-off-by: Vadim Kochan +--- + lib/crc16.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/lib/crc16.c b/lib/crc16.c +index f46ba72..89d2cff 100644 +--- a/lib/crc16.c ++++ b/lib/crc16.c +@@ -67,7 +67,9 @@ static const uint16_t crc16_tab[] = { + + uint16_t crc16_ccitt(uint16_t cksum, const unsigned char *buf, int len) + { +- for (int i = 0; i < len; i++) ++ int i; ++ ++ for (i = 0; i < len; i++) + cksum = crc16_tab[((cksum>>8) ^ *buf++) & 0xff] ^ (cksum << 8); + + return cksum; +-- +2.7.4 +