Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756795AbbBEGi4 (ORCPT ); Thu, 5 Feb 2015 01:38:56 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:39002 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754764AbbBEGhZ (ORCPT ); Thu, 5 Feb 2015 01:37:25 -0500 From: John Stultz To: Linux Kernel Mailing List Cc: John Stultz , Shuah Khan Subject: [PATCH 2/7] selftest/timers: Quiet warning due to lack of return check on brk Date: Wed, 4 Feb 2015 22:37:07 -0800 Message-Id: <1423118232-14096-3-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423118232-14096-1-git-send-email-john.stultz@linaro.org> References: <1423118232-14096-1-git-send-email-john.stultz@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1148 Lines: 37 The posix_timers.c test has a loop that tries to keep it in kernel space, repeatedly calling brk(). Since its noise, and a failure won't change what the test would do, add a unused value to quiet the warning. Cc: Shuah Khan Signed-off-by: John Stultz --- tools/testing/selftests/timers/posix_timers.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/timers/posix_timers.c b/tools/testing/selftests/timers/posix_timers.c index f87d970..3e04cc0 100644 --- a/tools/testing/selftests/timers/posix_timers.c +++ b/tools/testing/selftests/timers/posix_timers.c @@ -35,10 +35,11 @@ static void user_loop(void) static void kernel_loop(void) { void *addr = sbrk(0); + int unused; while (!done) { - brk(addr + 4096); - brk(addr); + unused = brk(addr + 4096); + unused = brk(addr); } } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/