From cd09f5d6b99545414f393aa36f1cdf627a257811 Mon Sep 17 00:00:00 2001 From: johann Date: Fri, 4 Sep 2009 22:13:35 +0000 Subject: [PATCH] Branch HEAD b=19674 Fix various warnings. --- libcfs/autoconf/lustre-libcfs.m4 | 17 ++++++++++------- lustre/obdclass/lustre_handles.c | 7 ++++--- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/libcfs/autoconf/lustre-libcfs.m4 b/libcfs/autoconf/lustre-libcfs.m4 index 601ccb7..acbe4a7 100644 --- a/libcfs/autoconf/lustre-libcfs.m4 +++ b/libcfs/autoconf/lustre-libcfs.m4 @@ -176,10 +176,11 @@ tmp_flags="$CFLAGS" CFLAGS="$CFLAGS -Werror" AC_COMPILE_IFELSE([ #include + #include int main(void) { unsigned long long *data1; - __u64 *data2; - + __u64 *data2 = NULL; + data1 = data2; return 0; } @@ -200,7 +201,7 @@ LB_LINUX_TRY_COMPILE([ ],[ unsigned long long *data1; __u64 *data2 = NULL; - + data1 = data2; ],[ AC_MSG_RESULT([yes]) @@ -219,10 +220,11 @@ tmp_flags="$CFLAGS" CFLAGS="$CFLAGS -Werror" AC_COMPILE_IFELSE([ #include + #include int main(void) { unsigned long *data1; - size_t *data2; - + size_t *data2 = NULL; + data1 = data2; return 0; } @@ -242,10 +244,11 @@ tmp_flags="$CFLAGS" CFLAGS="$CFLAGS -Werror" AC_COMPILE_IFELSE([ #include + #include int main(void) { long *data1; - ssize_t *data2; - + ssize_t *data2 = NULL; + data1 = data2; return 0; } diff --git a/lustre/obdclass/lustre_handles.c b/lustre/obdclass/lustre_handles.c index 961d506..b19b469 100644 --- a/lustre/obdclass/lustre_handles.c +++ b/lustre/obdclass/lustre_handles.c @@ -246,11 +246,12 @@ static void cleanup_all_handles(void) int i; for (i = 0; i < HANDLE_HASH_SIZE; i++) { - struct list_head *tmp, *pos; + struct list_head *pos, *n; + n = NULL; spin_lock(&handle_hash[i].lock); - list_for_each_safe_rcu(tmp, pos, &(handle_hash[i].head)) { + list_for_each_safe_rcu(pos, n, &(handle_hash[i].head)) { struct portals_handle *h; - h = list_entry(tmp, struct portals_handle, h_link); + h = list_entry(pos, struct portals_handle, h_link); CERROR("force clean handle "LPX64" addr %p addref %p\n", h->h_cookie, h, h->h_addref); -- 1.8.3.1