Re: assoc_array.c uninitialized variable (was: Re: [PATCH 02/10] Add a generic associative array implementation.)

2013-11-25 Thread Geert Uytterhoeven
Hi David, On Mon, Nov 25, 2013 at 10:36 AM, David Howells wrote: > Geert Uytterhoeven wrote: > >> > + int slot, next_slot, free_slot, i, j; >> >> lib/assoc_array.c: In function ‘assoc_array_insert_into_terminal_node’: >> lib/assoc_array.c:502: warning: ‘j’ may be used uninitialized in

Re: assoc_array.c uninitialized variable (was: Re: [PATCH 02/10] Add a generic associative array implementation.)

2013-11-25 Thread David Howells
Geert Uytterhoeven wrote: > > + int slot, next_slot, free_slot, i, j; > > lib/assoc_array.c: In function ‘assoc_array_insert_into_terminal_node’: > lib/assoc_array.c:502: warning: ‘j’ may be used uninitialized in this function What compiler are you using? Mine doesn't show this.

Re: assoc_array.c uninitialized variable (was: Re: [PATCH 02/10] Add a generic associative array implementation.)

2013-11-25 Thread David Howells
Geert Uytterhoeven ge...@linux-m68k.org wrote: + int slot, next_slot, free_slot, i, j; lib/assoc_array.c: In function ‘assoc_array_insert_into_terminal_node’: lib/assoc_array.c:502: warning: ‘j’ may be used uninitialized in this function What compiler are you using? Mine doesn't

Re: assoc_array.c uninitialized variable (was: Re: [PATCH 02/10] Add a generic associative array implementation.)

2013-11-25 Thread Geert Uytterhoeven
Hi David, On Mon, Nov 25, 2013 at 10:36 AM, David Howells dhowe...@redhat.com wrote: Geert Uytterhoeven ge...@linux-m68k.org wrote: + int slot, next_slot, free_slot, i, j; lib/assoc_array.c: In function ‘assoc_array_insert_into_terminal_node’: lib/assoc_array.c:502: warning: ‘j’ may

assoc_array.c uninitialized variable (was: Re: [PATCH 02/10] Add a generic associative array implementation.)

2013-11-23 Thread Geert Uytterhoeven
On Wed, Jul 17, 2013 at 10:43 PM, David Howells wrote: > +/* > + * Handle insertion into a terminal node. > + */ > +static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit > *edit, > + const struct > assoc_array_ops *ops, > +

assoc_array.c uninitialized variable (was: Re: [PATCH 02/10] Add a generic associative array implementation.)

2013-11-23 Thread Geert Uytterhoeven
On Wed, Jul 17, 2013 at 10:43 PM, David Howells dhowe...@redhat.com wrote: +/* + * Handle insertion into a terminal node. + */ +static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit, + const struct assoc_array_ops

Re: [PATCH 02/10] Add a generic associative array implementation.

2013-07-17 Thread George Spelvin
I have to say, the entire boolean type seems strange. I haven't looked at all the users, but wouldn't it be better to provide some simple helpers to allow call sites to set and test lsbits, and document the array as requiring 2-byte alignment of pointers? Factoring it into two features like this

Re: [PATCH 02/10] Add a generic associative array implementation.

2013-07-17 Thread David Howells
Joe Perches wrote: > bool type makes me queasy. :-) I've no particular objection to naming it something else - but what? 'Mark' maybe? David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH 02/10] Add a generic associative array implementation.

2013-07-17 Thread Joe Perches
On Wed, 2013-07-17 at 21:43 +0100, David Howells wrote: > Add a generic associative array implementation that can be used as the > container for keyrings, thereby massively increasing the capacity available > whilst also speeding up searching in keyrings that contain a lot of keys. > +extern int

Re: [PATCH 02/10] Add a generic associative array implementation.

2013-07-17 Thread Joe Perches
On Wed, 2013-07-17 at 21:43 +0100, David Howells wrote: Add a generic associative array implementation that can be used as the container for keyrings, thereby massively increasing the capacity available whilst also speeding up searching in keyrings that contain a lot of keys. +extern int

Re: [PATCH 02/10] Add a generic associative array implementation.

2013-07-17 Thread David Howells
Joe Perches j...@perches.com wrote: bool type makes me queasy. :-) I've no particular objection to naming it something else - but what? 'Mark' maybe? David -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 02/10] Add a generic associative array implementation.

2013-07-17 Thread George Spelvin
I have to say, the entire boolean type seems strange. I haven't looked at all the users, but wouldn't it be better to provide some simple helpers to allow call sites to set and test lsbits, and document the array as requiring 2-byte alignment of pointers? Factoring it into two features like this