Skip to contentSkip to conversation

btrfs-progs: Fix implicit strndup() and other warnings on RHEL 5

PATCH New Michael Tharp 1 participant 1 message May 20, 2010 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs-progs: Fix implicit strndup() and other warnings on RHEL 5

---
 btrfs-list.c |    7 ++++---
 btrfs.c      |    1 +
 2 files changed, 5 insertions(+), 3 deletions(-)
btrfs-list.c +4 -3
index 7741705..112bed2 100644
@@ -16,6 +16,7 @@
  * Boston, MA 021110-1307, USA.
  */
 
+#define _GNU_SOURCE
 #ifndef __CHECKER__
 #include <sys/ioctl.h>
 #include <sys/mount.h>
@@ -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;
btrfs.c +1 -0
index ab5e57f..672ffe2 100644
@@ -15,6 +15,7 @@
  */
 
 
+#define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
Signature · 1 line
1.6.6.1