From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB34AC433F5 for ; Fri, 19 Nov 2021 15:42:57 +0000 (UTC) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 80DB261051 for ; Fri, 19 Nov 2021 15:42:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 80DB261051 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.linux.it Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id C757A3C8C36 for ; Fri, 19 Nov 2021 16:42:55 +0100 (CET) Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [217.194.8.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 4A94E3C89AB for ; Fri, 19 Nov 2021 16:42:45 +0100 (CET) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id 9E271600704 for ; Fri, 19 Nov 2021 16:42:44 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id D1A5D1FD39; Fri, 19 Nov 2021 15:42:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1637336563; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mucNzesnt/VHKFIVjJWs3CfdgzCRiwEstVn3A8Nta2Y=; b=lKAW8YjNW1lsf0mQlhfOsBT6OqjCQ4EcuFR4gSeQzbBneL8nnc22zBWv5vnkNuyd+8eG+w oDlp5QFlBgA2dDAqlCpj9JxffQPEbTGDoHlPm88+hvJarHcTnmqPq3rX3piDM2EBQyqKe9 IMNtCn22keC/8YSujsLzsjncyX2PVGY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1637336563; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mucNzesnt/VHKFIVjJWs3CfdgzCRiwEstVn3A8Nta2Y=; b=jZsLhO5yvPn62NEpp23ci4oX96qH+yWV0giXtK0vJf7pC0D7bQKllRwnLf3nnUaHDD5UaQ XSP8sT69soUi5JCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id ABA5B13B35; Fri, 19 Nov 2021 15:42:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id nerdKfPFl2F1JQAAMHmgww (envelope-from ); Fri, 19 Nov 2021 15:42:43 +0000 Date: Fri, 19 Nov 2021 16:43:49 +0100 From: Cyril Hrubis To: Joerg Vehlow Message-ID: References: <20211119074602.857595-13-lkml@jv-coder.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211119074602.857595-13-lkml@jv-coder.de> X-Virus-Scanned: clamav-milter 0.102.4 at in-2.smtp.seeweb.it X-Virus-Status: Clean Subject: Re: [LTP] [PATCH 12/12] posix/interface/conformance: Fix/supress all unused-result warnings X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joerg Vehlow , ltp@lists.linux.it Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-bounces+ltp=archiver.kernel.org@lists.linux.it Sender: "ltp" Hi! > --- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-2.c > +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-2.c > @@ -33,6 +33,9 @@ > #include "posixtest.h" > #include "tempfile.h" > > +#pragma GCC diagnostic push > +#pragma GCC diagnostic ignored "-Wunused-result" > > #define WRITE(str) write(STDOUT_FILENO, str, sizeof(str) - 1) There is actually better trick than disabling the warning with pragmas, we use it in lib/tst_test.c as well: #define WRITE_MSG(msg) do { \ if (write(STDOUT_FILENO, msg, sizeof(msg) - 1)) { \ /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 */ \ } \ } while (0) I guess that we should add PTS_WRITE_MSG() to the posixtest.h and make use of it in all open posix tests. The rest of the patch looks good. -- Cyril Hrubis chrubis@suse.cz -- Mailing list info: https://lists.linux.it/listinfo/ltp