From patchwork Wed Dec 25 16:57:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 182445 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp771923ild; Wed, 25 Dec 2019 08:57:19 -0800 (PST) X-Google-Smtp-Source: APXvYqw5cfAUFAzcJMfx6qn+eIY26bNiuOPBDivxjSAnXSQGWbTsgELodJSsYw5Ibx/7PvTRHWAT X-Received: by 2002:a63:de4c:: with SMTP id y12mr43646896pgi.107.1577293039382; Wed, 25 Dec 2019 08:57:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577293039; cv=none; d=google.com; s=arc-20160816; b=JFvWjzYo0ef5Oz9gQ9rGmTd/Xf1O3deykfFiF3gyqJ6rpww3hDprA8elVU3u95k/Aq PqVmTrJAJCN0zXxHryL0lZcLK71zyTXU75jObLtxk81GEcyu+4YZqhCAtrMJTlIDT1Sg 0umENVeggV2C3DhaO8kLLHQDg6aZOz14ppLbOUUw81uXuz247dSCEIwp3/zvbdUTLrVX 7wnDx1pMZWgzie7iY1+YQgdraKXRR+KAT7NuVpaI1loSJcY0OauKSJMi7EFUtExeuwMj +c+r8LIR/nX6cAWsgDzit0G0yo6RjlY32iOEOYNYPWUfjvv2/zNJfdtH0k+PHYxs45TW FM3w== 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=qcpV9lMHB2Y+bWKuT7q/R1qVEsvK2ZeRcK+TsExd/9M=; b=ZVayp1AgSWZUmNuy6kcqQ59ES6GeL8vi2PFxopMJknzV3NhlhKCrPfBHoViTgiT1+T Iaw2kQI1kWXxRh3LcY941V86KHzZg4QwPN5ik+YbiD9eoHewOG+K9+GYvDVQaqnX95Mm +wKDMAW7KRpa6WGgRH0ttk6N/pLUCdwVqcpZlvFnCdZf0SVkTEAr5wLKsFWdChtG9Qac ymDpwHXeNVg5VoU8euLDpy+AV5+XHbI5WZXsfQOCwinm98/lB28dnvARpDJyQtU9HP3Q Ap8IHK/DPB6CesoDT+Zb6U61iiaUAJAk7NiWCuHnY/Kv6NRrS/NNDEKayXRDJOih6yqG +LFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=M6xENjYu; 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=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 em12si6479262pjb.70.2019.12.25.08.57.19; Wed, 25 Dec 2019 08:57:19 -0800 (PST) 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.s=20161025 header.b=M6xENjYu; 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=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 19E357CEF7; Wed, 25 Dec 2019 16:57:17 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mail.openembedded.org (Postfix) with ESMTP id 887606C23A for ; Wed, 25 Dec 2019 16:57:16 +0000 (UTC) Received: by mail-pg1-f179.google.com with SMTP id r11so11821167pgf.1 for ; Wed, 25 Dec 2019 08:57:18 -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=yqXuDyk/k5qi0oJk5X90GukFRT22ekXKXiUKwJnd3YI=; b=M6xENjYugeh0QvbV5dXJH3GhrQAbh5hbqKNbT+47cxg+PkDVLUnTEhE6rPn6I8/Hwq CyPvEH3/gYIsYoqELx68f9/lMpDLwhqbRJnn62/jP6Jy+bVepaRTcTuHfnUQrRHMu/qQ PfPH48c/Fg6svREcTADTc4TYtfyIIhO4O103odgt4ZMwsQEaPUQ4QnSB9UadZIUXxPz/ f3M8S57mzbBe17MKOYEYOGRtCJoHGgwouEnnIvdVCDFCu/B9rgol0si3QSe21Y5g2VRJ BuY3UJjrH9VXjMEKVp6KzEExFLM5wPgD6UYDz8qyEYPUiFfRisD1hOnFJE6u99m1QEaA cRDw== 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=yqXuDyk/k5qi0oJk5X90GukFRT22ekXKXiUKwJnd3YI=; b=boaAUBhGSpWKq2OacfVL4a1dgJEWdX0SLDDSLi0zUHY0KbIjG0aHFHVmdhlE/0CmJQ eLY8DnuVvWzyE4StOwiRgc3U5ab3i7tNeb29G/q6AjCjLNAzPjIMcscXbZiscU1pSTUK 0OCl2/rZyakP6EZMkblPs8mE85gO1XGM1vasDZo8+ow4b+UtY2RiqoZXk+Va33qQs7vi BddQyfwcJ6gL2hZNDRvLsZaWigs2n0XbvS4Zr9IXBI5tbE8hrpdsWYPRHnTCIaQgY1CO V0jHZf203bKBJ17LB8w0Y1yk/55RniEJTdyC/RFDse2jAFUUZpf/jzHuuCIvdU0utT7K cfLw== X-Gm-Message-State: APjAAAXqXj3N8/9dqgdDCTa97464XttBz3jq+Zy9NipuzOk69ww8n3jH wGuSQP+l8maV8J3y/3SNJxoeU0E1PWE= X-Received: by 2002:a63:3484:: with SMTP id b126mr42740531pga.17.1577293037198; Wed, 25 Dec 2019 08:57:17 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9200:4e0::36e9]) by smtp.gmail.com with ESMTPSA id p23sm30380829pgh.83.2019.12.25.08.57.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Dec 2019 08:57:16 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Wed, 25 Dec 2019 08:57:07 -0800 Message-Id: <20191225165709.2123137-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [oe] [meta-oe][PATCH 1/3] upm: Fix 'may be used uninitialized' errors 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: , Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- ...nitialize-local-variables-before-use.patch | 57 +++++++++++++++++++ meta-oe/recipes-extended/upm/upm_git.bb | 1 + 2 files changed, 58 insertions(+) create mode 100644 meta-oe/recipes-extended/upm/upm/0001-initialize-local-variables-before-use.patch -- 2.24.1 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-extended/upm/upm/0001-initialize-local-variables-before-use.patch b/meta-oe/recipes-extended/upm/upm/0001-initialize-local-variables-before-use.patch new file mode 100644 index 0000000000..f9fae1641d --- /dev/null +++ b/meta-oe/recipes-extended/upm/upm/0001-initialize-local-variables-before-use.patch @@ -0,0 +1,57 @@ +From cce8be3966b602cf7e20d559e50fcf493b9b42cc Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 23 Dec 2019 18:13:21 -0800 +Subject: [PATCH] initialize local variables before use + +fixes +error: 'ctrl_reg2_data' may be used uninitialized in this function [-Werror=maybe-uninitialized] + +Upstream-Status: Submitted [https://github.com/eclipse/upm/pull/693] +Signed-off-by: Khem Raj +--- + src/kxtj3/kxtj3.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/kxtj3/kxtj3.c b/src/kxtj3/kxtj3.c +index a6f3c4f8..050ae585 100755 +--- a/src/kxtj3/kxtj3.c ++++ b/src/kxtj3/kxtj3.c +@@ -715,7 +715,7 @@ upm_result_t kxtj3_sensor_software_reset(const kxtj3_context dev) + if (kxtj3_set_bit_on(dev, KXTJ3_CTRL_REG2, KXTJ3_CTRL_REG2_SRST) != UPM_SUCCESS) + return UPM_ERROR_OPERATION_FAILED; + +- uint8_t ctrl_reg2_data; ++ uint8_t ctrl_reg2_data = 0; + kxtj3_read_register(dev, KXTJ3_CTRL_REG2, &ctrl_reg2_data); + + uint8_t srst_counter = 0; +@@ -824,7 +824,7 @@ upm_result_t kxtj3_enable_interrupt_pin(const kxtj3_context dev, KXTJ3_INTERRUPT + KXTJ3_INTERRUPT_RESPONSE_T response_type) + { + assert(dev != NULL); +- uint8_t int_reg_value; ++ uint8_t int_reg_value = 0; + kxtj3_read_register(dev, KXTJ3_INT_CTRL_REG1, &int_reg_value); + + if (polarity) +@@ -865,7 +865,7 @@ upm_result_t kxtj3_set_interrupt_response(const kxtj3_context dev, KXTJ3_INTERRU + bool kxtj3_get_interrupt_status(const kxtj3_context dev) + { + assert(dev != NULL); +- uint8_t status_reg_value; ++ uint8_t status_reg_value = 0; + kxtj3_read_register(dev, KXTJ3_STATUS_REG, &status_reg_value); + if (!(status_reg_value & KXTJ3_STATUS_REG_INT)) + return false; +@@ -955,7 +955,7 @@ kxtj3_wakeup_axes kxtj3_get_wakeup_axis_and_direction(kxtj3_context dev) + { + assert(dev != NULL); + +- uint8_t int_source2_value; ++ uint8_t int_source2_value = 0; + kxtj3_read_register(dev, KXTJ3_INT_SOURCE2, &int_source2_value); + + kxtj3_wakeup_axes wakeup_axis; +-- +2.24.1 + diff --git a/meta-oe/recipes-extended/upm/upm_git.bb b/meta-oe/recipes-extended/upm/upm_git.bb index dbe97370d5..7564738dda 100644 --- a/meta-oe/recipes-extended/upm/upm_git.bb +++ b/meta-oe/recipes-extended/upm/upm_git.bb @@ -13,6 +13,7 @@ PV = "2.0.0+git${SRCPV}" SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http \ file://0001-CMakeLists.txt-Use-SWIG_SUPPORT_FILES-to-find-the-li.patch \ file://0001-Use-stdint-types.patch \ + file://0001-initialize-local-variables-before-use.patch \ " SRC_URI_append_toolchain-clang_x86 = " file://0001-nmea_gps-Link-with-latomic.patch "