Re: [PATCH] warnkill trivia 2/2

From: Tomas Szepe (szepe@pinerecords.com)
Date: Sun Sep 01 2002 - 07:10:53 EST


> Let's keep the sparc atomic_read() how it is so more bugs
> like this can be found.

I don't know, though... scratching my head here -- Is GCC actually
able to distinguish between 'const int *a' and 'int const *a'?

Because if 'int const *a' means that the pointer is constant but
not the actual value it points to,

void a(int const *a) { *a = 1; }

shouldn't be generating 'warning: assignment of read-only location'.
Right?

> Reiserfs is buggy, it means struct buffer_head const * bh

Okay so that gives us the third reiserfs patch of the day:

--- buffer2.c~ 2002-09-01 13:52:39.000000000 +0200
+++ buffer2.c 2002-09-01 13:44:19.000000000 +0200
@@ -21,7 +21,7 @@
    hold we did free all buffers in tree balance structure
    (get_empty_nodes and get_nodes_for_preserving) or in path structure
    only (get_new_buffer) just before calling this */
-void wait_buffer_until_released (const struct buffer_head * bh)
+void wait_buffer_until_released (struct buffer_head const *bh)
 {
   int repeat_counter = 0;
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 07 2002 - 22:00:14 EST