From patchwork Thu May 20 15:25:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tharp X-Patchwork-Id: 101220 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4KICYHD022734 for ; Thu, 20 May 2010 18:12:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756033Ab0ETSFB (ORCPT ); Thu, 20 May 2010 14:05:01 -0400 Received: from rdu-nat.rpath.com ([66.192.95.194]:56151 "EHLO rdu-nat.rpath.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756091Ab0ETSE7 (ORCPT ); Thu, 20 May 2010 14:04:59 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 20 May 2010 18:12:35 +0000 (UTC) X-Greylist: delayed 3459 seconds by postgrey-1.27 at vger.kernel.org; Thu, 20 May 2010 14:04:58 EDT Received: from logo.rdu.rpath.com (logo.rdu.rpath.com [172.16.58.38]) by rdu-nat.rpath.com (8.14.2/8.14.2) with ESMTP id o4KH7FQJ019161 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 20 May 2010 13:07:15 -0400 Received: from logo.rdu.rpath.com (localhost.localdomain [127.0.0.1]) by logo.rdu.rpath.com (8.13.7/8.13.7) with ESMTP id o4KH7Fhg002816; Thu, 20 May 2010 13:07:15 -0400 Received: (from mtharp@localhost) by logo.rdu.rpath.com (8.13.7/8.13.7/Submit) id o4KH7EB5002815; Thu, 20 May 2010 17:07:14 GMT Message-Id: <201005201707.o4KH7EB5002815@logo.rdu.rpath.com> From: Michael Tharp Date: Thu, 20 May 2010 11:25:04 -0400 Subject: [PATCH] btrfs-progs: Fix implicit strndup() and other warnings on RHEL 5 To: Chris Mason , linux-btrfs@vger.kernel.org Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org diff --git a/btrfs-list.c b/btrfs-list.c index 7741705..112bed2 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -16,6 +16,7 @@ * Boston, MA 021110-1307, USA. */ +#define _GNU_SOURCE #ifndef __CHECKER__ #include #include @@ -662,9 +663,9 @@ static int print_one_extent(int fd, struct btrfs_ioctl_search_header *sh, char **cache_dir_name, u64 *cache_ino, char **cache_full_name) { - u64 len; - u64 disk_start; - u64 disk_offset; + u64 len = 0; + u64 disk_start = 0; + u64 disk_offset = 0; u8 type; int compressed = 0; int flags = 0; diff --git a/btrfs.c b/btrfs.c index ab5e57f..672ffe2 100644 --- a/btrfs.c +++ b/btrfs.c @@ -15,6 +15,7 @@ */ +#define _GNU_SOURCE #include #include #include