ZFS: Fix compile warning in cmd_zfs.c (GCC 4.6.4 from ELDK 5.2.1)
PATCH 1/2 ZFS: Fix compile warning in cmd_zfs.c (GCC 4.6.4 from ELDK 5.2.1)
This patch fixes the following compile warnings:
cmd_zfs.c:177:1: warning: initialization from incompatible pointer type [enabled by default] cmd_zfs.c:177:1: warning: (near initialization for '_u_boot_list_cmd_zfsls.cmd') [enabled by default] cmd_zfs.c:182:1: warning: initialization from incompatible pointer type [enabled by default] cmd_zfs.c:182:1: warning: (near initialization for '_u_boot_list_cmd_zfsload.cmd') [enabled by default]
--- common/cmd_zfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
common/cmd_zfs.c +2 -2
@@ -46,7 +46,7 @@#define DOS_FS_TYPE_OFFSET 0x36#define DOS_FS32_TYPE_OFFSET 0x52 -static int do_zfs_load (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) +static int do_zfs_load (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) {char *filename =NULL ;int dev;
@@ -146,7 +146,7 @@ int zfs_print(const char *entry, const struct zfs_dirhook_info *data) -static int do_zfs_ls (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) +static int do_zfs_ls (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) {const char *filename ="/" ;int part;
Signature · 1 line
1.8.0
PATCH 2/2 ZFS: Fix compile warning in fs/zfs/zfs.c (GCC 4.6.4 from ELDK 5.2.1)
This patch fixes the following compile warning:
zfs.c:2006:1: warning: 'zfs_label' defined but not used [-Wunused-function] zfs.c:2029:1: warning: 'zfs_uuid' defined but not used [-Wunused-function]
--- fs/zfs/zfs.c | 51 --------------------------------------------------- 1 file changed, 51 deletions(-)
fs/zfs/zfs.c +0 -51
@@ -2002,49 +2002,6 @@ zfs_fetch_nvlist(device_t dev, char **nvlist)return err; } -static int -zfs_label (device_t device,char **label) -{ -char *nvlist; -int err; -struct zfs_data *data; - - data =zfs_mount (device); -if (!data) -return ZFS_ERR_BAD_FS ; - - err =int_zfs_fetch_nvlist (data, &nvlist); -if (err) { -zfs_unmount (data); -return err; - } - - *label =zfs_nvlist_lookup_string (nvlist,ZPOOL_CONFIG_POOL_NAME ); -free (nvlist); -zfs_unmount (data); -return ZFS_ERR_NONE ; -} - -static int -zfs_uuid (device_t device,char **uuid) -{ -struct zfs_data *data; - - data =zfs_mount (device); -if (!data) -return ZFS_ERR_BAD_FS ; - - *uuid =malloc (17 );/* %016llx + nil */ -if (!*uuid) -return ZFS_ERR_OUT_OF_MEMORY ; - -/* *uuid = xasprintf ("%016llx", (long long unsigned) data->pool_guid);*/ -snprintf (*uuid,17 ,"%016llx" , (long long unsigned ) data->pool_guid); -zfs_unmount (data); - -return ZFS_ERR_NONE ; -} -/* * zfs_open() locates a file in the rootpool by following the * MOS and places the dnode of the file in the memory address DNODE.
@@ -2325,14 +2282,6 @@ zfs_ls(device_t device, const char *path,struct zfs_data *data;int err;int isfs; -#if 0 -char *label =NULL ; - -zfs_label (device, &label); -if (label) -printf ("ZPOOL label '%s'\n" , - label); -#endif data =zfs_mount (device);if (!data)
Signature · 1 line
1.8.0
PATCH 1/2 ZFS: Fix compile warning in cmd_zfs.c (GCC 4.6.4 from ELDK 5.2.1)
In reply to Stefan RoeseQuoted 9 lines · Stefan Roese
This patch fixes the following compile warnings:
cmd_zfs.c:177:1: warning: initialization from incompatible pointer type [enabled by default] cmd_zfs.c:177:1: warning: (near initialization for '_u_boot_list_cmd_zfsls.cmd') [enabled by default] cmd_zfs.c:182:1: warning: initialization from incompatible pointer type [enabled by default] cmd_zfs.c:182:1: warning: (near initialization for '_u_boot_list_cmd_zfsload.cmd') [enabled by default]
Signed-off-by Stefan Roese <[email protected]>Cc Jorgen Lundman <[email protected]>
This and 2/2 are now applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121104/1f380ee3/attachment.pgp>