From patchwork Fri Mar 1 16:47:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 1050305 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.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="uZckmPeq"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 449wMF4zZRz9sMQ for ; Sat, 2 Mar 2019 03:47:37 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id DEC28283E2; Fri, 1 Mar 2019 16:47:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h8RtxRfM1zux; Fri, 1 Mar 2019 16:47:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id BC1F628BFA; Fri, 1 Mar 2019 16:47:25 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 2A5FC1BF2B6 for ; Fri, 1 Mar 2019 16:47:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 277CC86FD3 for ; Fri, 1 Mar 2019 16:47:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yVM3BEmvCxgz for ; Fri, 1 Mar 2019 16:47:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by whitealder.osuosl.org (Postfix) with ESMTPS id 21FED86EB2 for ; Fri, 1 Mar 2019 16:47:23 +0000 (UTC) Received: by mail-wr1-f50.google.com with SMTP id i12so26645869wrw.0 for ; Fri, 01 Mar 2019 08:47:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references:mime-version:content-transfer-encoding; bh=YTAqwiTMGyOvgJjQAWu+9ogNfJCenm+qugKwSCMoAag=; b=uZckmPeqsquVbQF40cVnV59zEZ/h8dFRlSedSGvxpv5SgQ9HH7pj8yVhSuddeor5Kd hcaVREirtf2kGRGDxw3sVock3ieJ0mJUHSy/JM442MmSNwalaJZvvpJxNPgzoeptXMoq pW3CEY198U+tgF1OBr3SpxFaHg9P9dOiR9lVA3vw54XskJlXx8/6DYHK+CvkqFAwcNdf MwmSDt09jb6Gy/gl5qeLRfYDoQGbjNWKJdmeqg9bIYA6szNKc32eK5sb4Dfwn4/DE2Or 3tViWAlaG117GuapeQBWYwg6XiRzD8WWpCssD8YqFivFyBSmgHF20WIJLqnbFQGh7Hqh pnWQ== 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:in-reply-to:references:mime-version :content-transfer-encoding; bh=YTAqwiTMGyOvgJjQAWu+9ogNfJCenm+qugKwSCMoAag=; b=GRfdVBEvyigJ/TwiTg9aDLtADTouV7PjFuOaHy2mx48buo4GbLfoOVEYkzVSl/Br3C vAZUn5SfP9VuoZ0VKYwhXJpMIty6ajqcWAVLSX1c6xpyAEzVJZELGW9WuK36knbINber 4htPH1Fjg3pdbPVhpHabtEPeZu+Neffwuy7gKYZKddgFThhT0NsGAk01WLa5D1yd7bxf hIQgofTHXqkfEoB0kkHKw0xZ6Q18h6MwYdvB6b/OH1ulVHOHxYh73ut5TxW6SOc6Hl80 xTlKh1P0NdyJE0cuUJBOi03Qnxyy9L80D2a/wNm+Zl1NwXxQYE2HMmaRmrCfG3ej0Xmb Z/gQ== X-Gm-Message-State: APjAAAVoCOntVTZnzCbUtKKILnEdITmntwKsR4I5B66j2yQWSpwUuQ5L BwnahSbx3jiosNAhehm5JqNBZ2MUNXk= X-Google-Smtp-Source: APXvYqzuhgqryQpj7Gk0sPozrQBEWiAj2m19olAY19ybM3aRp4VXSnAXVr18KEPPjnCrSI+JOJW8rA== X-Received: by 2002:adf:a147:: with SMTP id r7mr3957797wrr.5.1551458841217; Fri, 01 Mar 2019 08:47:21 -0800 (PST) Received: from lmenx29q.lme.st.com. ([80.215.103.67]) by smtp.gmail.com with ESMTPSA id l18sm20826744wrv.20.2019.03.01.08.47.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Mar 2019 08:47:20 -0800 (PST) From: Etienne Carriere To: buildroot@buildroot.org Date: Fri, 1 Mar 2019 17:47:08 +0100 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH/next 4/9] package/optee-client: fix build warnings 3.4.0 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: Etienne Carriere Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" And a patch for optee-client package currently synced with tag 3.4.0 which contains source issues to be fixed. Signed-off-by: Etienne Carriere --- .../0001-libteec-fix-build-warnings.patch | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 package/optee-client/0001-libteec-fix-build-warnings.patch diff --git a/package/optee-client/0001-libteec-fix-build-warnings.patch b/package/optee-client/0001-libteec-fix-build-warnings.patch new file mode 100644 index 0000000..21f47ec --- /dev/null +++ b/package/optee-client/0001-libteec-fix-build-warnings.patch @@ -0,0 +1,65 @@ +From 657414ccd20b4fb2985efd83b0679964fec923c2 Mon Sep 17 00:00:00 2001 +From: Etienne Carriere +Date: Fri, 1 Mar 2019 09:36:46 +0100 +Subject: [PATCH] libteec: fix build warnings +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fix build warnings reported by the Buildroot team [1]: + +/home/thomas/projets/outputs/armv5-ctng-linux-gnueabi/build/optee-client-3.4.0/libteec/src/tee_client_api.c: In function 'TEEC_InitializeContext': +/home/thomas/projets/outputs/armv5-ctng-linux-gnueabi/build/optee-client-3.4.0/libteec/src/tee_client_api.c:149:28: error: 'gen_caps' may be used uninitialized in this function [-Werror=maybe-uninitialized] + ctx->reg_mem = gen_caps & TEE_GEN_CAP_REG_MEM; + ^ +/home/thomas/projets/buildroot/output/build/optee-client-3.4.0/libteec/src/tee_client_api.c: In function ‘TEEC_OpenSession’: +/home/thomas/projets/buildroot/output/build/optee-client-3.4.0/libteec/src/tee_client_api.c:507:8: error: cast increases required alignment of target type [-Werror=cast-align] + arg = (struct tee_ioctl_open_session_arg *)buf; + ^ +/home/thomas/projets/buildroot/output/build/optee-client-3.4.0/libteec/src/tee_client_api.c: In function ‘TEEC_InvokeCommand’: +/home/thomas/projets/buildroot/output/build/optee-client-3.4.0/libteec/src/tee_client_api.c:581:8: error: cast increases required alignment of target type [-Werror=cast-align] + arg = (struct tee_ioctl_invoke_arg *)buf; + ^ + +[1] http://lists.busybox.net/pipermail/buildroot/2019-February/243437.html + +Reported-by: Thomas Petazzoni +Signed-off-by: Etienne Carriere +--- + libteec/src/tee_client_api.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libteec/src/tee_client_api.c b/libteec/src/tee_client_api.c +index 698092b..a8683fd 100644 +--- a/libteec/src/tee_client_api.c ++++ b/libteec/src/tee_client_api.c +@@ -140,7 +140,7 @@ TEEC_Result TEEC_InitializeContext(const char *name, TEEC_Context *ctx) + return TEEC_ERROR_BAD_PARAMETERS; + + for (n = 0; n < TEEC_MAX_DEV_SEQ; n++) { +- uint32_t gen_caps; ++ uint32_t gen_caps = 0; + + snprintf(devname, sizeof(devname), "/dev/tee%zu", n); + fd = teec_open_dev(devname, name, &gen_caps); +@@ -504,7 +504,7 @@ TEEC_Result TEEC_OpenSession(TEEC_Context *ctx, TEEC_Session *session, + buf_data.buf_ptr = (uintptr_t)buf; + buf_data.buf_len = sizeof(buf); + +- arg = (struct tee_ioctl_open_session_arg *)buf; ++ arg = (struct tee_ioctl_open_session_arg *)(void *)buf; + arg->num_params = TEEC_CONFIG_PAYLOAD_REF_COUNT; + params = (struct tee_ioctl_param *)(arg + 1); + +@@ -578,7 +578,7 @@ TEEC_Result TEEC_InvokeCommand(TEEC_Session *session, uint32_t cmd_id, + buf_data.buf_ptr = (uintptr_t)buf; + buf_data.buf_len = sizeof(buf); + +- arg = (struct tee_ioctl_invoke_arg *)buf; ++ arg = (struct tee_ioctl_invoke_arg *)(void *)buf; + arg->num_params = TEEC_CONFIG_PAYLOAD_REF_COUNT; + params = (struct tee_ioctl_param *)(arg + 1); + +-- +1.9.1 +