From 7b8d2b38a12ed7e0a63ad9b1c38bfa20d8317b11 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Fri, 17 Jul 2009 22:44:24 +0000 Subject: fix build warnings in 'libglusterfsclient' Signed-off-by: Anand V. Avati BUG: 130 (build warnings) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=130 --- libglusterfsclient/src/libglusterfsclient.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libglusterfsclient') diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index 6ff6f243f21..0133126cd48 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -7067,6 +7067,7 @@ static struct xlator_cbks libgf_client_cbks = { static inline xlator_t * libglusterfs_graph (xlator_t *graph) { + int ret = 0; xlator_t *top = NULL; xlator_list_t *xlchild, *xlparent; @@ -7084,7 +7085,10 @@ libglusterfs_graph (xlator_t *graph) xlparent = CALLOC (1, sizeof(*xlparent)); xlparent->xlator = top; graph->parents = xlparent; - asprintf (&top->type, LIBGF_XL_NAME); + ret = asprintf (&top->type, LIBGF_XL_NAME); + if (-1 == ret) { + fprintf (stderr, "failed to set the top xl's type"); + } top->init = libgf_client_init; top->fops = &libgf_client_fops; -- cgit