All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] make fs/reiser4/search.c compile with gcc 4.0
@ 2004-09-22 18:45 Grzegorz Jaśkiewicz
  2004-09-22 18:59 ` Valdis.Kletnieks
  0 siblings, 1 reply; 4+ messages in thread
From: Grzegorz Jaśkiewicz @ 2004-09-22 18:45 UTC (permalink / raw)
  To: reiserfs-list

Here's full message, this is linux 2.6.9-rc2-mm1
 gcc -Wp,-MD,fs/reiser4/.search.o.d -nostdinc -iwithprefix include
-D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs
-fno-strict-aliasing -fno-common -O2 -fomit-frame-pointer
-Wdeclaration-after-statement -pipe -msoft-float
-mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=pentium3
-Iinclude/asm-i386/mach-default -Wformat -Wundef -Wunused -Wcomment
-Wno-nested-externs -Wno-write-strings -Wno-sign-compare
-Wuninitialized   -DKBUILD_BASENAME=search -DKBUILD_MODNAME=reiser4 -c
-o fs/reiser4/.tmp_search.o fs/reiser4/search.c
fs/reiser4/search.c: In function 'cbk_node_lookup':
fs/reiser4/search.c:1111: error: invalid storage class for function 'key_is_ld'

gcc --version
gcc (GCC) 4.0.0 20040922 (experimental)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I know gcc 4.0 is still in it's alphas.
Obvious solution is to move function declared in other function
up-wards. Since it's static anyway, it won't make any diffrence.
Please consider applying to repo.
Thanks.

-----

--- fs/reiser4/search.c    2004-09-22 20:38:04 +0200
+++ fs/reiser4/search.new.c        2004-09-22 20:37:26 +0200
@@ -1088,6 +1088,20 @@
 }
 #endif

+/* true if @key is left delimiting key of @node */
+static int key_is_ld(znode * node, const reiser4_key * key) {
+       int ld;
+
+        assert("nikita-1716", node != NULL);
+        assert("nikita-1758", key != NULL);
+
+        RLOCK_DK(znode_get_tree(node));
+        assert("nikita-1759", znode_contains_key(node, key));
+        ld = keyeq(znode_get_ld_key(node), key);
+        RUNLOCK_DK(znode_get_tree(node));
+        return ld;
+}
+
 /* Process one node during tree traversal.

    This is called by cbk_level_lookup(). */
@@ -1107,19 +1121,6 @@
        /* result */
        int result;

-       /* true if @key is left delimiting key of @node */
-       static int key_is_ld(znode * node, const reiser4_key * key) {
-               int ld;
-
-                assert("nikita-1716", node != NULL);
-                assert("nikita-1758", key != NULL);
-
-                RLOCK_DK(znode_get_tree(node));
-                assert("nikita-1759", znode_contains_key(node, key));
-                ld = keyeq(znode_get_ld_key(node), key);
-                RUNLOCK_DK(znode_get_tree(node));
-                return ld;
-       }
        assert("nikita-379", h != NULL);

        active = h->active_lh->node;


-- 
GJ

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-09-22 19:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-22 18:45 [PATCH] make fs/reiser4/search.c compile with gcc 4.0 Grzegorz Jaśkiewicz
2004-09-22 18:59 ` Valdis.Kletnieks
2004-09-22 19:03   ` Grzegorz Jaśkiewicz
2004-09-22 19:09     ` Valdis.Kletnieks

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.