Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/yamt-pagecache]: src/common/lib/libc/gen suppress gcc warnings



details:   https://anonhg.NetBSD.org/src/rev/1cb80db07de2
branches:  yamt-pagecache
changeset: 770910:1cb80db07de2
user:      yamt <yamt%NetBSD.org@localhost>
date:      Thu May 22 19:09:50 2014 +0000

description:
suppress gcc warnings

diffstat:

 common/lib/libc/gen/radixtree.c |  20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diffs (59 lines):

diff -r db7ec8140f8c -r 1cb80db07de2 common/lib/libc/gen/radixtree.c
--- a/common/lib/libc/gen/radixtree.c   Thu May 22 15:50:12 2014 +0000
+++ b/common/lib/libc/gen/radixtree.c   Thu May 22 19:09:50 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radixtree.c,v 1.17.2.5 2014/03/25 16:21:08 yamt Exp $  */
+/*     $NetBSD: radixtree.c,v 1.17.2.6 2014/05/22 19:09:50 yamt Exp $  */
 
 /*-
  * Copyright (c)2011,2012,2013 YAMAMOTO Takashi,
@@ -112,7 +112,7 @@
 #include <sys/cdefs.h>
 
 #if defined(_KERNEL) || defined(_STANDALONE)
-__KERNEL_RCSID(0, "$NetBSD: radixtree.c,v 1.17.2.5 2014/03/25 16:21:08 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radixtree.c,v 1.17.2.6 2014/05/22 19:09:50 yamt Exp $");
 #include <sys/param.h>
 #include <sys/errno.h>
 #include <sys/pool.h>
@@ -122,7 +122,7 @@
 #include <lib/libsa/stand.h>
 #endif /* defined(_STANDALONE) */
 #else /* defined(_KERNEL) || defined(_STANDALONE) */
-__RCSID("$NetBSD: radixtree.c,v 1.17.2.5 2014/03/25 16:21:08 yamt Exp $");
+__RCSID("$NetBSD: radixtree.c,v 1.17.2.6 2014/05/22 19:09:50 yamt Exp $");
 #include <assert.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -700,9 +700,12 @@
 gang_lookup_init(struct radix_tree *t, uint64_t idx,
     struct radix_tree_path *path, const unsigned int tagmask)
 {
-       void **vpp;
+       void **vpp __unused;
 
-       vpp = radix_tree_lookup_ptr(t, idx, path, false, tagmask);
+#if defined(DIAGNOSTIC)
+       vpp =
+#endif /* defined(DIAGNOSTIC) */
+       radix_tree_lookup_ptr(t, idx, path, false, tagmask);
        KASSERT(vpp == NULL ||
            vpp == path_pptr(t, path, path->p_lastidx));
        KASSERT(&t->t_root == path_pptr(t, path, 0));
@@ -979,11 +982,14 @@
 radix_tree_set_tag(struct radix_tree *t, uint64_t idx, unsigned int tagmask)
 {
        struct radix_tree_path path;
-       void **vpp;
+       void **vpp __unused;
        int i;
 
        KASSERT(tagmask != 0);
-       vpp = radix_tree_lookup_ptr(t, idx, &path, false, 0);
+#if defined(DIAGNOSTIC)
+       vpp =
+#endif /* defined(DIAGNOSTIC) */
+       radix_tree_lookup_ptr(t, idx, &path, false, 0);
        KASSERT(vpp != NULL);
        KASSERT(*vpp != NULL);
        KASSERT(path.p_lastidx == t->t_height);



Home | Main Index | Thread Index | Old Index