From commits-return-7476-archive-asf-public=cust-asf.ponee.io@nuttx.apache.org Fri Apr 17 09:06:11 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id E136418066D for ; Fri, 17 Apr 2020 11:06:10 +0200 (CEST) Received: (qmail 58931 invoked by uid 500); 17 Apr 2020 09:06:10 -0000 Mailing-List: contact commits-help@nuttx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nuttx.apache.org Delivered-To: mailing list commits@nuttx.apache.org Received: (qmail 58916 invoked by uid 99); 17 Apr 2020 09:06:10 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Apr 2020 09:06:10 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id C32498B6AD; Fri, 17 Apr 2020 09:06:09 +0000 (UTC) Date: Fri, 17 Apr 2020 09:06:10 +0000 To: "commits@nuttx.apache.org" Subject: [incubator-nuttx-apps] 01/02: Fix bas_program.c build warning under macos MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: xiaoxiang@apache.org In-Reply-To: <158711436938.21677.14333581126896403535@gitbox.apache.org> References: <158711436938.21677.14333581126896403535@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-nuttx-apps X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: 5a29e86847562fbbb474696bc5f4148f8a516c67 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20200417090609.C32498B6AD@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git commit 5a29e86847562fbbb474696bc5f4148f8a516c67 Author: liuhaitao AuthorDate: Fri Apr 17 10:03:10 2020 +0800 Fix bas_program.c build warning under macos bas_program.c:234:35: error: adding 'size_t' (aka 'unsigned long') to a string does not append to the string [-Werror,-Wstring-plus-int] FS_putChars(chn, " " + len); ~~~~~~~~~~~^~~~~ bas_program.c:234:35: note: use array indexing to silence this warning FS_putChars(chn, " " + len); ^ & [ ] 1 error generated. Signed-off-by: liuhaitao --- interpreters/bas/bas_program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interpreters/bas/bas_program.c b/interpreters/bas/bas_program.c index dd6e0da..a4355ed 100644 --- a/interpreters/bas/bas_program.c +++ b/interpreters/bas/bas_program.c @@ -231,7 +231,7 @@ static void printName(const void *k, struct Program *p, int chn) FS_putChars(chn, (const char *)k); if (len < 8) { - FS_putChars(chn, " " + len); + FS_putChars(chn, &(" "[len])); } }