From patchwork Tue Dec 23 11:39:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 42564 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6E4772188F for ; Tue, 23 Dec 2014 11:40:50 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id bs8sf4003234wib.2 for ; Tue, 23 Dec 2014 03:40:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=9m8/owMVM63YAaGY4h5VfqWAuv++9P6rmC+Enh8a1jg=; b=cnH16YSHRQqBLDnNxJsvZafnE57y5UvtsaJTFGriDJmuSwRCNM2y4vvB9FHl5qyLrz ML/NrNQBkrdiyixaAmgf6kZkxCjWC71rEQyXsUMqFUYCThobR2fVtFNx8Sz7F5XEYNqi jrDpqPRH7D3Cmau4fQkU9RogddNHPya6exKxQBqRnSx5wUI6ieM8pJIuc56E629BgcaP aTsl7rFtxhcb+AeDcFEe7fyPtI7rIfXvFCqcKg8pHiXqTQIFevfx1E/1Gpiln5faYO1d ENtGCCDkZ5F1eysum05h1kJENQpdaoenbxMfxvaLf3CdjW6KLKFSt3HOQipD1DqzrhzK OyWQ== X-Gm-Message-State: ALoCoQkoMyZRqcf/2JIPdDXG1wAK5ruSdg5J8PN+4tTIP7Tvw4P4h031ookf+n20U15bh7mnOQ4P X-Received: by 10.181.13.147 with SMTP id ey19mr2753310wid.2.1419334849723; Tue, 23 Dec 2014 03:40:49 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.37 with SMTP id g5ls1605815lah.102.gmail; Tue, 23 Dec 2014 03:40:49 -0800 (PST) X-Received: by 10.152.206.108 with SMTP id ln12mr26930680lac.3.1419334849498; Tue, 23 Dec 2014 03:40:49 -0800 (PST) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id or4si21365046lbb.22.2014.12.23.03.40.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Dec 2014 03:40:49 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by mail-lb0-f179.google.com with SMTP id z11so5143019lbi.38 for ; Tue, 23 Dec 2014 03:40:49 -0800 (PST) X-Received: by 10.152.87.12 with SMTP id t12mr27029017laz.31.1419334849410; Tue, 23 Dec 2014 03:40:49 -0800 (PST) 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.112.142.69 with SMTP id ru5csp1300449lbb; Tue, 23 Dec 2014 03:40:48 -0800 (PST) X-Received: by 10.224.103.195 with SMTP id l3mr30385311qao.38.1419334847878; Tue, 23 Dec 2014 03:40:47 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id m6si23001333qaz.25.2014.12.23.03.40.46 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 23 Dec 2014 03:40:47 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Y3NpV-00022W-1I; Tue, 23 Dec 2014 11:40:45 +0000 Received: from mail-lb0-f175.google.com ([209.85.217.175]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Y3NpG-0001y9-1f for lng-odp@lists.linaro.org; Tue, 23 Dec 2014 11:40:30 +0000 Received: by mail-lb0-f175.google.com with SMTP id u10so5123662lbd.6 for ; Tue, 23 Dec 2014 03:40:24 -0800 (PST) X-Received: by 10.152.19.71 with SMTP id c7mr26985981lae.79.1419334824386; Tue, 23 Dec 2014 03:40:24 -0800 (PST) Received: from localhost.localdomain ([188.92.105.210]) by mx.google.com with ESMTPSA id cy6sm5784098lbb.39.2014.12.23.03.40.22 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Dec 2014 03:40:23 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Tue, 23 Dec 2014 14:39:57 +0300 Message-Id: <1419334799-19653-3-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.8.5.1.163.gd7aced9 In-Reply-To: <1419334799-19653-1-git-send-email-maxim.uvarov@linaro.org> References: <1419334799-19653-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 2/4] validation: queue: check return value for odp_queue_enq_multi X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: maxim.uvarov@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.217.179 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 CID 85005: Unchecked return value (CHECKED_RETURN) Calling "odp_queue_enq_multi" without checking return value (as is done elsewhere 4 out of 5 times). Signed-off-by: Maxim Uvarov --- test/validation/odp_queue.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/validation/odp_queue.c b/test/validation/odp_queue.c index b5ccf9a..0613fd0 100644 --- a/test/validation/odp_queue.c +++ b/test/validation/odp_queue.c @@ -40,7 +40,7 @@ static void test_odp_queue_sunnyday(void) odp_buffer_pool_t msg_pool; odp_queue_param_t param; odp_buffer_t *pbuf_tmp; - int i, deq_ret; + int i, deq_ret, ret; int nr_deq_entries = 0; int max_iteration = CONFIG_MAX_ITERATION; void *prtn = NULL; @@ -79,7 +79,8 @@ static void test_odp_queue_sunnyday(void) * odp_queue_enq_multi may return 0..n buffers due to the resource * constraints in the implementation at that given point of time. */ - odp_queue_enq_multi(queue_id, enbuf, MAX_BUFFER_QUEUE); + ret = odp_queue_enq_multi(queue_id, enbuf, MAX_BUFFER_QUEUE); + CU_ASSERT(0 == ret); pbuf_tmp = debuf; do { deq_ret = odp_queue_deq_multi(queue_id, pbuf_tmp,