btrfs-progs: Fix implicit strndup() and other warnings on RHEL 5
PATCH 1/1 btrfs-progs: Fix implicit strndup() and other warnings on RHEL 5
Signed-off-by Michael Tharp <[email protected]>
--- btrfs-list.c | 7 ++++--- btrfs.c | 1 + 2 files changed, 5 insertions(+), 3 deletions(-)
btrfs-list.c +4 -3
@@ -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
@@ -15,6 +15,7 @@*/ +#define _GNU_SOURCE#include <stdio.h> #include <stdlib.h> #include <string.h>
Signature · 1 line
1.6.6.1