diff --git a/src/dyad/dtl/flux_dtl.c b/src/dyad/dtl/flux_dtl.c index 80c7aeda..a26f1503 100644 --- a/src/dyad/dtl/flux_dtl.c +++ b/src/dyad/dtl/flux_dtl.c @@ -162,7 +162,7 @@ dyad_rc_t dyad_dtl_flux_send (const dyad_ctx_t* ctx, void* buf, size_t buflen) rc = flux_respond_raw (ctx->dtl_handle->private_dtl.flux_dtl_handle->h, ctx->dtl_handle->private_dtl.flux_dtl_handle->msg, buf, - (int)buflen); + buflen); if (FLUX_IS_ERROR (rc)) { DYAD_LOG_ERROR (ctx, "Could not send Flux RPC response containing file " @@ -196,8 +196,8 @@ dyad_rc_t dyad_dtl_flux_recv (const dyad_ctx_t* ctx, void** buf, size_t* buflen) goto finish_recv; } void* tmp_buf; - int tmp_buflen = 0; - rc = flux_rpc_get_raw (dtl_handle->f, (const void**)&tmp_buf, (int*)&tmp_buflen); + size_t tmp_buflen = 0; + rc = flux_rpc_get_raw (dtl_handle->f, (const void**)&tmp_buf, &tmp_buflen); if (FLUX_IS_ERROR (rc)) { DYAD_LOG_ERROR (ctx, "Could not get file data from Flux RPC"); if (errno == ENODATA) @@ -206,7 +206,7 @@ dyad_rc_t dyad_dtl_flux_recv (const dyad_ctx_t* ctx, void** buf, size_t* buflen) dyad_rc = DYAD_RC_BADRPC; goto finish_recv; } - *buflen = (size_t) tmp_buflen; + *buflen = tmp_buflen; dyad_rc = ctx->dtl_handle->get_buffer (ctx, *buflen, buf); if (DYAD_IS_ERROR (dyad_rc)) { *buf = NULL; diff --git a/tests/modules/compute.c b/tests/modules/compute.c index 5ba4efc2..38e1ff5b 100644 --- a/tests/modules/compute.c +++ b/tests/modules/compute.c @@ -138,12 +138,12 @@ int main (int argc, char **argv) // Extract the data from reply const char *file_data = NULL; - int file_len = 0; + size_t file_len = 0; if (flux_rpc_get_raw (f2, (const void **)&file_data, &file_len) < 0) { flux_log_error (h, "flux_rpc_get_raw(\"%s\") failed.\n", file_name); goto done; } - fprintf (df, "Consumer file size: %d\n", file_len); + fprintf (df, "Consumer file size: %zu\n", file_len); // Set output file path char file_path[PATH_MAX + 1] = {'\0'}; @@ -167,7 +167,7 @@ int main (int argc, char **argv) fprintf (df, "Could not write file: %s\n", file_path); goto done; } - fwrite (file_data, sizeof (char), (size_t)file_len, of); + fwrite (file_data, sizeof (char), file_len, of); fclose (of); flux_future_destroy (f2);