Re: [tabled patch 2/4] fix the selection of chunk
Jeff Garzik <[email protected]> Tue, 25 May 2010 18:44:11 -0400
| Newsgroups | org.kernel.vger.hail-devel |
|---|---|
| Message-ID | <[email protected]> |
On 05/21/2010 10:19 PM, Pete Zaitcev wrote:
> +static int object_node_select(int *nx, struct db_obj_ent *obj)
> +{
> + int i;
> + uint32_t nid;
> + struct storage_node *stnode;
> +
> + for (i = 0; i< MAXWAY; i++) {
> + nid = GUINT32_FROM_LE(obj->d.a.nidv[*nx]);
> + if (nid) {
> + stnode = stor_node_by_nid(nid);
> + if (stnode) {
> + if (stnode->up)
> + return stnode;
> + stor_node_put(stnode);
> + }
> + }
> + *nx = (*nx + 1) % MAXWAY;
> + }
> + return NULL;
> +}
Did you compile or test this???
object.c: In function ‘object_node_select’:
object.c:1096: warning: return makes integer from pointer without a cast
object.c:1102: warning: return makes integer from pointer without a cast
object.c: In function ‘object_get_body’:
object.c:1220: warning: assignment makes pointer from integer without a cast
The code appears to be wanting to return a pointer.
Dropped patches 2-4, presuming they will be resent after being fixed