Commit 15aec2b6 authored by Rob Latham's avatar Rob Latham

warning fixups

parent 59f693ae
...@@ -35,7 +35,6 @@ int mobject_store_aio_create_completion(void *cb_arg, ...@@ -35,7 +35,6 @@ int mobject_store_aio_create_completion(void *cb_arg,
int mobject_store_aio_wait_for_complete(mobject_store_completion_t c) int mobject_store_aio_wait_for_complete(mobject_store_completion_t c)
{ {
int r;
if(c == MOBJECT_COMPLETION_NULL) { if(c == MOBJECT_COMPLETION_NULL) {
MOBJECT_LOG("Warning: passing NULL to mobject_store_aio_wait_for_complete"); MOBJECT_LOG("Warning: passing NULL to mobject_store_aio_wait_for_complete");
return -1; return -1;
...@@ -48,6 +47,7 @@ int mobject_store_aio_wait_for_complete(mobject_store_completion_t c) ...@@ -48,6 +47,7 @@ int mobject_store_aio_wait_for_complete(mobject_store_completion_t c)
c->state = COMPLETION_JOINED; c->state = COMPLETION_JOINED;
} }
// int r;
// int* val_ptr = (int*)0; // int* val_ptr = (int*)0;
// r = ABT_eventual_wait(c->eventual, (void**)(&val_ptr)); // r = ABT_eventual_wait(c->eventual, (void**)(&val_ptr));
// MOBJECT_ASSERT(r == ABT_SUCCESS, "ABT_eventual_wait failed"); // MOBJECT_ASSERT(r == ABT_SUCCESS, "ABT_eventual_wait failed");
...@@ -104,7 +104,7 @@ void mobject_store_aio_release(mobject_store_completion_t c) ...@@ -104,7 +104,7 @@ void mobject_store_aio_release(mobject_store_completion_t c)
int r; int r;
if(c == MOBJECT_COMPLETION_NULL) return; if(c == MOBJECT_COMPLETION_NULL) return;
//r = ABT_eventual_free(c->eventual); //r = ABT_eventual_free(c->eventual);
MOBJECT_ASSERT(r == ABT_SUCCESS, "ABT_eventual_free failed"); //MOBJECT_ASSERT(r == ABT_SUCCESS, "ABT_eventual_free failed");
r = ABT_rwlock_free(c->lock); r = ABT_rwlock_free(c->lock);
MOBJECT_ASSERT(r == ABT_SUCCESS, "ABT_rwlock_free failed"); MOBJECT_ASSERT(r == ABT_SUCCESS, "ABT_rwlock_free failed");
free(c); free(c);
......
...@@ -14,6 +14,7 @@ int mobject_store_ioctx_create( ...@@ -14,6 +14,7 @@ int mobject_store_ioctx_create(
// TODO take mid from cluster parameter // TODO take mid from cluster parameter
*ioctx = (mobject_store_ioctx_t)calloc(1, sizeof(**ioctx)); *ioctx = (mobject_store_ioctx_t)calloc(1, sizeof(**ioctx));
(*ioctx)->pool_name = strdup(pool_name); (*ioctx)->pool_name = strdup(pool_name);
return 0;
} }
void mobject_store_ioctx_destroy(mobject_store_ioctx_t ioctx) void mobject_store_ioctx_destroy(mobject_store_ioctx_t ioctx)
......
...@@ -200,6 +200,7 @@ int mobject_store_write_op_operate(mobject_store_write_op_t write_op, ...@@ -200,6 +200,7 @@ int mobject_store_write_op_operate(mobject_store_write_op_t write_op,
margo_free_output(h,&resp); margo_free_output(h,&resp);
margo_destroy(h); margo_destroy(h);
return 0;
} }
int mobject_store_read_op_operate(mobject_store_read_op_t read_op, int mobject_store_read_op_operate(mobject_store_read_op_t read_op,
......
...@@ -230,4 +230,5 @@ int mobject_store_aio_read_op_operate(mobject_store_read_op_t read_op, ...@@ -230,4 +230,5 @@ int mobject_store_aio_read_op_operate(mobject_store_read_op_t read_op,
ABT_thread_create(pool, aio_read_op_operate_ult, args, ABT_THREAD_ATTR_NULL, &ult); ABT_thread_create(pool, aio_read_op_operate_ult, args, ABT_THREAD_ATTR_NULL, &ult);
completion->ult = ult; completion->ult = ult;
*/ */
return 0;
} }
...@@ -92,7 +92,7 @@ static decode_fn decode_read_action[_READ_OPCODE_END_ENUM_] = { ...@@ -92,7 +92,7 @@ static decode_fn decode_read_action[_READ_OPCODE_END_ENUM_] = {
*/ */
hg_return_t hg_proc_mobject_store_read_op_t(hg_proc_t proc, mobject_store_read_op_t* read_op) hg_return_t hg_proc_mobject_store_read_op_t(hg_proc_t proc, mobject_store_read_op_t* read_op)
{ {
rd_action_base_t elem, tmp; rd_action_base_t elem;
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
uintptr_t position = 0; uintptr_t position = 0;
......
...@@ -146,16 +146,16 @@ hg_return_t encode_omap_response(hg_proc_t proc, rd_response_omap_t r) ...@@ -146,16 +146,16 @@ hg_return_t encode_omap_response(hg_proc_t proc, rd_response_omap_t r)
ret = hg_proc_memcpy(proc, &(r->prval), sizeof(r->prval)); ret = hg_proc_memcpy(proc, &(r->prval), sizeof(r->prval));
if(ret != HG_SUCCESS) return ret; if(ret != HG_SUCCESS) return ret;
ret = hg_proc_mobject_store_omap_iter_t(proc, &(r->iter)); ret = hg_proc_mobject_store_omap_iter_t(proc, &(r->iter));
if(ret != HG_SUCCESS) return ret; return ret;
} }
hg_return_t decode_omap_response(hg_proc_t proc, rd_response_omap_t* r) hg_return_t decode_omap_response(hg_proc_t proc, rd_response_omap_t* r)
{ {
*r = (rd_response_omap_t)calloc(1, sizeof(**r)); *r = (rd_response_omap_t)calloc(1, sizeof(**r));
hg_return_t ret; hg_return_t ret = HG_SUCCESS;
ret = hg_proc_memcpy(proc, &((*r)->prval), sizeof((*r)->prval)); ret = hg_proc_memcpy(proc, &((*r)->prval), sizeof((*r)->prval));
if(ret != HG_SUCCESS) return ret; if(ret != HG_SUCCESS) return ret;
ret = hg_proc_mobject_store_omap_iter_t(proc, &((*r)->iter)); ret = hg_proc_mobject_store_omap_iter_t(proc, &((*r)->iter));
if(ret != HG_SUCCESS) return ret; return ret;
} }
...@@ -142,7 +142,7 @@ static decode_fn decode_write_action[_WRITE_OPCODE_END_ENUM_] = { ...@@ -142,7 +142,7 @@ static decode_fn decode_write_action[_WRITE_OPCODE_END_ENUM_] = {
*/ */
hg_return_t hg_proc_mobject_store_write_op_t(hg_proc_t proc, mobject_store_write_op_t* write_op) hg_return_t hg_proc_mobject_store_write_op_t(hg_proc_t proc, mobject_store_write_op_t* write_op)
{ {
wr_action_base_t elem, tmp; wr_action_base_t elem;
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
uintptr_t position = 0; uintptr_t position = 0;
......
...@@ -49,7 +49,7 @@ hg_return_t hg_proc_mobject_store_omap_iter_t(hg_proc_t proc, mobject_store_omap ...@@ -49,7 +49,7 @@ hg_return_t hg_proc_mobject_store_omap_iter_t(hg_proc_t proc, mobject_store_omap
if(ret != HG_SUCCESS) return ret; if(ret != HG_SUCCESS) return ret;
ret = hg_proc_hg_size_t(proc, &val_size); ret = hg_proc_hg_size_t(proc, &val_size);
if(ret != HG_SUCCESS) return ret; if(ret != HG_SUCCESS) return ret;
val - (char*)malloc(val_size); val = (char*)malloc(val_size);
ret = hg_proc_memcpy(proc, val, val_size); ret = hg_proc_memcpy(proc, val, val_size);
omap_iter_append(*iter, key, val, val_size); omap_iter_append(*iter, key, val, val_size);
} }
......
...@@ -197,8 +197,6 @@ static hg_return_t mobject_write_op_ult(hg_handle_t h) ...@@ -197,8 +197,6 @@ static hg_return_t mobject_write_op_ult(hg_handle_t h)
write_op_in_t in; write_op_in_t in;
write_op_out_t out; write_op_out_t out;
margo_instance_id mid = margo_hg_handle_get_instance(h);
/* Deserialize the input from the received handle. */ /* Deserialize the input from the received handle. */
ret = margo_get_input(h, &in); ret = margo_get_input(h, &in);
assert(ret == HG_SUCCESS); assert(ret == HG_SUCCESS);
...@@ -231,8 +229,6 @@ static hg_return_t mobject_read_op_ult(hg_handle_t h) ...@@ -231,8 +229,6 @@ static hg_return_t mobject_read_op_ult(hg_handle_t h)
read_op_in_t in; read_op_in_t in;
read_op_out_t out; read_op_out_t out;
margo_instance_id mid = margo_hg_handle_get_instance(h);
/* Deserialize the input from the received handle. */ /* Deserialize the input from the received handle. */
ret = margo_get_input(h, &in); ret = margo_get_input(h, &in);
assert(ret == HG_SUCCESS); assert(ret == HG_SUCCESS);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment