From patchwork Fri Jul 25 22:20:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gary.robertson@linaro.org X-Patchwork-Id: 34323 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DF61A235AB for ; Fri, 25 Jul 2014 22:21:37 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id at20sf31466315iec.7 for ; Fri, 25 Jul 2014 15:21:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=E77jDCOVApAdPuMVfhGHUbiAY6xCJf8LxFgb5CIj32E=; b=dlrqz1iUNTYsJ1whf+zkbuJydkmHhNBeLcU3cn6Oyv7F4Vnrlb6gRyHZAExLgaFLJ0 YkBcIqupA2go5DszM8KoIfAmew84VBPAhFvbop0yNcL46wuIg5/qCEW6nzAP2brB9B4u bhRvsEfJminvXRDqJiB68R0pLUPJfXgSDXIInvwmTqSffADZO+sFFwDj+cwbltlvHnrd /r3xspgM9jzoPAk5bFQF8LDM2RTRrBefiPN3e2LPQJMZYEZIbdSO3GTDchfedZC7xKbB FQyd5hQllqH7M+n4R7jZk6R2LRvDll9uCcRpG5BGtr8Ko7YbEdMcojg9F15iTB5cVTu/ X+Vg== X-Gm-Message-State: ALoCoQncNbMj2xQigFOqw3X4Q9IQAfrqTFg85kgdL+rLtf9VaPkhGktf2IXoT1CqYD2ZXSQ+p3bq X-Received: by 10.42.39.140 with SMTP id h12mr11038674ice.9.1406326897239; Fri, 25 Jul 2014 15:21:37 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.23.148 with SMTP id 20ls876890qgp.86.gmail; Fri, 25 Jul 2014 15:21:37 -0700 (PDT) X-Received: by 10.52.163.136 with SMTP id yi8mr20768784vdb.14.1406326897065; Fri, 25 Jul 2014 15:21:37 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id s10si8455502vek.70.2014.07.25.15.21.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Jul 2014 15:21:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 as permitted sender) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id id10so8337661vcb.35 for ; Fri, 25 Jul 2014 15:21:37 -0700 (PDT) X-Received: by 10.52.244.81 with SMTP id xe17mr20666822vdc.24.1406326896940; Fri, 25 Jul 2014 15:21:36 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp70138vcb; Fri, 25 Jul 2014 15:21:36 -0700 (PDT) X-Received: by 10.66.141.165 with SMTP id rp5mr22078613pab.90.1406326896103; Fri, 25 Jul 2014 15:21:36 -0700 (PDT) Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id bi4si5271874pdb.77.2014.07.25.15.21.35 for ; Fri, 25 Jul 2014 15:21:36 -0700 (PDT) Received-SPF: none (google.com: openembedded-core-bounces@lists.openembedded.org does not designate permitted sender hosts) client-ip=140.211.169.62; Received: from mail.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id CAFA17073D; Fri, 25 Jul 2014 22:21:14 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-oa0-f47.google.com (mail-oa0-f47.google.com [209.85.219.47]) by mail.openembedded.org (Postfix) with ESMTP id 23F506AC9D for ; Fri, 25 Jul 2014 22:21:06 +0000 (UTC) Received: by mail-oa0-f47.google.com with SMTP id g18so6311743oah.20 for ; Fri, 25 Jul 2014 15:21:07 -0700 (PDT) X-Received: by 10.182.24.101 with SMTP id t5mr27334664obf.66.1406326867626; Fri, 25 Jul 2014 15:21:07 -0700 (PDT) Received: from honkintosh.cybertech.lan (65-120-133-114.dia.static.qwest.net. [65.120.133.114]) by mx.google.com with ESMTPSA id q3sm40881371oei.3.2014.07.25.15.21.06 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Jul 2014 15:21:07 -0700 (PDT) From: "Gary S. Robertson" To: openembedded-core@lists.openembedded.org Date: Fri, 25 Jul 2014 17:20:44 -0500 Message-Id: <1406326845-17506-3-git-send-email-gary.robertson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1406326845-17506-1-git-send-email-gary.robertson@linaro.org> References: <1406326845-17506-1-git-send-email-gary.robertson@linaro.org> Cc: mike.holmes@linaro.org Subject: [OE-core] [PATCH 2/3] LTP: pthread_cond_many - fix uninitialized return in parse_args X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: gary.robertson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: "Gary S. Robertson" The parse_args() function in realtime test pthread_cond_many contains a switch statement im which some cases failed to initialize the function return variable prior to returning... added an init clause to the definition statement for the return variable. Signed-off-by: Gary S. Robertson --- ...d_many-fix-uninitialized-return-in-option.patch | 31 ++++++++++++++++++++ meta/recipes-extended/ltp/ltp_20140422.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta/recipes-extended/ltp/ltp/0001-pthread_cond_many-fix-uninitialized-return-in-option.patch diff --git a/meta/recipes-extended/ltp/ltp/0001-pthread_cond_many-fix-uninitialized-return-in-option.patch b/meta/recipes-extended/ltp/ltp/0001-pthread_cond_many-fix-uninitialized-return-in-option.patch new file mode 100644 index 0000000..90c9d8e --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-pthread_cond_many-fix-uninitialized-return-in-option.patch @@ -0,0 +1,31 @@ +From 409c00bf4484d40380947fd27329b64ebee29874 Mon Sep 17 00:00:00 2001 +From: "Gary S. Robertson" +Date: Fri, 25 Jul 2014 09:41:51 -0500 +Subject: [PATCH] pthread_cond_many: fix uninitialized return in option + handling + +Some of the cases in the switch statement in parse_args() did not +initialize the 'handled' variable which is returned by the function. +Added an initialization to the definition of the variable. + +Signed-off-by: Gary S. Robertson +--- + .../realtime/perf/latency/pthread_cond_many.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/testcases/realtime/perf/latency/pthread_cond_many.c b/testcases/realtime/perf/latency/pthread_cond_many.c +index f9325b5..1d39100 100644 +--- a/testcases/realtime/perf/latency/pthread_cond_many.c ++++ b/testcases/realtime/perf/latency/pthread_cond_many.c +@@ -256,7 +256,7 @@ void usage(void) + + int parse_args(int c, char *v) + { +- int handled; ++ int handled = 1; + switch (c) { + case 'h': + usage(); +-- +1.7.9.5 + diff --git a/meta/recipes-extended/ltp/ltp_20140422.bb b/meta/recipes-extended/ltp/ltp_20140422.bb index 2ac2187..f86a195 100644 --- a/meta/recipes-extended/ltp/ltp_20140422.bb +++ b/meta/recipes-extended/ltp/ltp_20140422.bb @@ -27,6 +27,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \ file://ltp-Do-not-link-against-libfl.patch \ file://automake-foreign.patch \ file://0001-Allow-mutex-initialization-without-PI-configured.patch \ + file://0001-pthread_cond_many-fix-uninitialized-return-in-option.patch \ " S = "${WORKDIR}/git"