From patchwork Fri Mar 2 08:02:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinhui Huang X-Patchwork-Id: 880362 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cn.fujitsu.com Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zt1xp25J7z9sWB for ; Fri, 2 Mar 2018 19:02:49 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 739EA3E76D2 for ; Fri, 2 Mar 2018 09:02:46 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) by picard.linux.it (Postfix) with ESMTP id AD3EB3E72F9 for ; Fri, 2 Mar 2018 09:02:44 +0100 (CET) Received: from heian.cn.fujitsu.com (mail.cn.fujitsu.com [183.91.158.132]) by in-2.smtp.seeweb.it (Postfix) with ESMTP id CBBBE601F79 for ; Fri, 2 Mar 2018 09:02:41 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="37417960" Received: from bogon (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 02 Mar 2018 16:02:36 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id 326D648AE761 for ; Fri, 2 Mar 2018 16:02:32 +0800 (CST) Received: from localhost.localdomain (10.167.220.196) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 2 Mar 2018 16:02:30 +0800 From: Jinhui Huang To: Date: Fri, 2 Mar 2018 16:02:22 +0800 Message-ID: <1519977744-1595-1-git-send-email-huangjh.jy@cn.fujitsu.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.167.220.196] X-yoursite-MailScanner-ID: 326D648AE761.AE8FE X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: huangjh.jy@cn.fujitsu.com X-Spam-Status: No, score=-0.0 required=7.0 tests=T_RP_MATCHES_RCVD autolearn=disabled version=3.4.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH 1/3] syscalls/fchmod*: Fix compiler warnings X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Jinhui Huang --- testcases/kernel/syscalls/fchmod/fchmod05.c | 4 ++-- testcases/kernel/syscalls/fchmod/fchmod07.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/testcases/kernel/syscalls/fchmod/fchmod05.c b/testcases/kernel/syscalls/fchmod/fchmod05.c index 7a27028..cdd3d07 100644 --- a/testcases/kernel/syscalls/fchmod/fchmod05.c +++ b/testcases/kernel/syscalls/fchmod/fchmod05.c @@ -220,8 +220,8 @@ void cleanup(void) /* Close the test directory opened in the setup() */ SAFE_CLOSE(NULL, fd); - setegid(0); - seteuid(0); + SAFE_SETEGID(NULL, 0); + SAFE_SETEUID(NULL, 0); tst_rmdir(); diff --git a/testcases/kernel/syscalls/fchmod/fchmod07.c b/testcases/kernel/syscalls/fchmod/fchmod07.c index 66032e4..6973555 100644 --- a/testcases/kernel/syscalls/fchmod/fchmod07.c +++ b/testcases/kernel/syscalls/fchmod/fchmod07.c @@ -83,7 +83,7 @@ int fd; /* file descriptor for testfile */ char *TCID = "fchmod07"; int TST_TOTAL = 8; /* Total number of test conditions */ -int Modes[] = { 0, 07, 070, 0700, 0777, 02777, 04777, 06777 }; +mode_t Modes[] = { 0, 07, 070, 0700, 0777, 02777, 04777, 06777 }; void setup(); /* setup function for the test */ void cleanup(); /* cleanup function for the test */ @@ -93,7 +93,7 @@ int main(int ac, char **av) struct stat stat_buf; /* stat(2) struct contents */ int lc; int ind; /* counter variable for chmod(2) tests */ - int mode; /* file mode permission */ + mode_t mode; /* file mode permission */ TST_TOTAL = sizeof(Modes) / sizeof(int);