From patchwork Sun Nov 29 19:45:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 7719311 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6A81E9F30B for ; Sun, 29 Nov 2015 19:45:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 89A2F20558 for ; Sun, 29 Nov 2015 19:45:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9E46720557 for ; Sun, 29 Nov 2015 19:45:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751988AbbK2TpU (ORCPT ); Sun, 29 Nov 2015 14:45:20 -0500 Received: from mail-bn1bon0082.outbound.protection.outlook.com ([157.56.111.82]:37439 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751743AbbK2TpT (ORCPT ); Sun, 29 Nov 2015 14:45:19 -0500 Received: from BY2PR02CA0040.namprd02.prod.outlook.com (10.141.216.30) by BY2PR02MB300.namprd02.prod.outlook.com (10.141.140.26) with Microsoft SMTP Server (TLS) id 15.1.331.20; Sun, 29 Nov 2015 19:45:16 +0000 Received: from BN1BFFO11FD001.protection.gbl (2a01:111:f400:7c10::1:150) by BY2PR02CA0040.outlook.office365.com (2a01:111:e400:2c40::30) with Microsoft SMTP Server (TLS) id 15.1.331.20 via Frontend Transport; Sun, 29 Nov 2015 19:45:16 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.172) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.172 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.172; helo=milsmgep11.sandisk.com; Received: from milsmgep11.sandisk.com (63.163.107.172) by BN1BFFO11FD001.mail.protection.outlook.com (10.58.144.64) with Microsoft SMTP Server id 15.1.331.11 via Frontend Transport; Sun, 29 Nov 2015 19:45:16 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com ( [172.22.12.162]) by milsmgep11.sandisk.com (Symantec Messaging Gateway) with SMTP id E7.2F.04667.6C55B565; Sun, 29 Nov 2015 11:45:10 -0800 (PST) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.248.2; Sun, 29 Nov 2015 11:45:10 -0800 X-AuditID: ac160a68-f790b6d00000123b-59-565b55c659ed Received: from [10.50.231.67] ( [10.177.8.100]) by milsmgip12.sandisk.com (Symantec Messaging Gateway) with SMTP id 32.78.17166.5C55B565; Sun, 29 Nov 2015 11:45:10 -0800 (PST) Subject: [PATCH 3/4] crd_read_line(): Rework code to suppress a compiler warning To: Adrian Chiris References: <565B553C.6020005@sandisk.com> CC: linux-rdma From: Bart Van Assche Message-ID: <565B55C5.9040006@sandisk.com> Date: Sun, 29 Nov 2015 11:45:09 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <565B553C.6020005@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCLMWRmVeSWpSXmKPExsWyRoxnke6x0Ogwg0n3+CzmT9jLbvHsUC+L A5PHs+mHmTw+b5ILYIrisklJzcksSy3St0vgytj9bS5TwXK2igOX/7I3MC5g6WLk5JAQMJHY f+orI4QtJnHh3nq2LkYuDiGBE4wS07t3s0I4Oxglnq+5Atfxqu0yG4gtJLCZUWLSqRAQW1gg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k77bqFg2X/f+25/uPyO76xRjp12R+V/0/4i8ve2HxkSOxj+eK/fu3b1Q3Kwh RImlOCPRUIu5qDgRAEU7TszuAQAA X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD001; 1:uYIWF3gFLKlZ5W67htBnGNpFWo2l8sjd/6tDQ+LDkkXn365kOfFAJhlvYvTcx/6IviRwF5NwHtIkBNdMWvrO/5mY8t/BBJ1cuC5mmOExABkclkv5Yk9VjGClD656wJDuAPjlB1I+P/s58Rm2Exg6uATuJ1BcgFqiPP8IHN3cdj/tRFiHPKR7E6UGIfJ4WoeqItHwuXOTKYGkLP3rNfCaX/XT8iJNyPLhumvcN4KD34Up6Ymw9ySSeqUFWo/2lOCXT0WhZOA1M1RqkAUhwXdN7sFOci/Y8Jbr/7BFmb8ua/uCQ5OftTGvbhbbyc+x28IsMnvUI2gbxGgBFnkr3Je+cQTw3pGs1geYiWB5nIioRaBWI58UCqeX00OSJZ671ISgZ+PQgMRZs6lTOPZSUgNTKdIrJSlerDzgK6HeugVW9XQ= X-Forefront-Antispam-Report: CIP:63.163.107.172; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(23676002)(59896002)(5008740100001)(92566002)(97736004)(189998001)(87266999)(230700001)(65816999)(4001350100001)(81156007)(5001960100002)(1220700001)(229853001)(110136002)(586003)(1096002)(2950100001)(36756003)(11100500001)(77096005)(80316001)(54356999)(86362001)(87936001)(76176999)(19580395003)(65956001)(65806001)(50466002)(50986999)(106466001)(33656002)(83506001)(19580405001)(47776003)(64126003)(69596002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR02MB300; H:milsmgep11.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB300; 2:M4xaJO9tgqsWNUyMeNOg9TVXiwm4ug01M4M2jdhAbjW3TD40Sw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QlMtlWZYFne6kUW8+17cGl6WgOhEyDZ9Cv48k1jeLS921Uc283/9aqqWPEwgTMOAcEuh9h9lf4GzdnMnbWZ9dtCG/dSkgkt3XPWoagq5PBzTPi+0YDhTSBgxVmixHDiIilpvhInTPax6SeCFBsSIrXiDNnkQ74AbhRNMBx6MBf8mb+NMGGbS71; 4:jqww7bjbNlsQFMKwC8K1YpfRkJBzPOOK0T7GgUuOMIOoIY3zjKkRXYMR/873n1UpYQFMUehMuna1Nx48dGvdyQlr1laq7w+ECTrZt1HNV/Ubs1878JggD5HrMzh9ee7vbBII/W5cBBZ2+IazCtqmIgYvp0YWIePgWPl/yS2IIKvOulULwNGyoucmpd8unaM59hctFnPF/POEzguUO060e1fZb48roRtJs27FZqHJ3VECrjZn+S/PczSTuAij7ReFtsmf3Gsen1I10+YHNQ0fzdsTicarmhBlVJNdwaolaF0Yr0AOgrDx0b1nLXk26DF99CVWWcLpR1qfn1vtD2aWAfsToYGSmBFPUKa3Url2uhiTPsW4f8DwRopfb/4w4v8NlpCJ67Qf+Po6bQnyc1HJByScNaoXZ9pLjUMSgvY yEpo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(10201501046)(3002001); SRVR:BY2PR02MB300; BCL:0; PCL:0; RULEID:; SRVR:BY2PR02MB300; X-Forefront-PRVS: 0775716B9D X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTJQUjAyTUIzMDA7MjM6UCtyNHY5UnIyaEJtekQzNm1NYjhSQkNUeS9n?= =?utf-8?B?Zjk0bWZWU25PVStyNzVHM0gvNzUrdmRjeFg5VDVuUUVTeGJ4ZVIybllnTVc4?= =?utf-8?B?TzZlVmdDWUFpTUI3VHZvUDdEVHpGdVZFejEvVHVKOG5iSjJmeUVweG5KQlhR?= =?utf-8?B?amlOUTMwbWhQbFZ0Ylppd0Z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DiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2015 19:45:16.0461 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.172]; Helo=[milsmgep11.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR02MB300 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Avoid that gcc prints a warning about not checking the result of fgets(). Signed-off-by: Bart Van Assche --- mstdump/crd_lib/crdump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mstdump/crd_lib/crdump.c b/mstdump/crd_lib/crdump.c index 451a944..3e3c4bc 100755 --- a/mstdump/crd_lib/crdump.c +++ b/mstdump/crd_lib/crdump.c @@ -504,8 +504,8 @@ static int crd_read_line(IN FILE *fd, OUT char *tmp) { if (!feof(fd)) { int c = fgetc(fd); if (c == '#') { - char* _ptr=fgets (tmp, 300, fd); - (void)_ptr;//avoid warning + if (fgets(tmp, 300, fd)) { + } tmp[0] = 0; continue; }