From a20254c8a5c597abb04ece356f8ced26c704238c Mon Sep 17 00:00:00 2001 From: Shiqing Fan Date: Thu, 5 Feb 2009 16:37:44 +0000 Subject: [PATCH] A few type casts, making the MS compiler silent. This commit was SVN r20449. --- orte/mca/grpcomm/basic/grpcomm_basic_module.c | 6 +++--- orte/mca/plm/base/plm_base_launch_support.c | 4 ++-- orte/util/nidmap.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/orte/mca/grpcomm/basic/grpcomm_basic_module.c b/orte/mca/grpcomm/basic/grpcomm_basic_module.c index 6ac1c22201..303552b2ac 100644 --- a/orte/mca/grpcomm/basic/grpcomm_basic_module.c +++ b/orte/mca/grpcomm/basic/grpcomm_basic_module.c @@ -601,7 +601,7 @@ static int do_modex(opal_list_t *procs) attr->size = num_bytes; if (num_bytes != 0) { - if (NULL == (attr->bytes = malloc(num_bytes))) { + if (NULL == (attr->bytes = (uint8_t *) malloc(num_bytes))) { ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE); rc = ORTE_ERR_OUT_OF_RESOURCE; goto cleanup; @@ -726,7 +726,7 @@ static int modex(opal_list_t *procs) nd = (orte_nid_t**)orte_nidmap.addr; while (0 < read(fd, &bo.size, sizeof(bo.size))) { /* this is the number of bytes in the byte object */ - bo.bytes = malloc(bo.size); + bo.bytes = (uint8_t *) malloc(bo.size); if (0 > read(fd, bo.bytes, bo.size)) { orte_show_help("help-orte-runtime.txt", "orte_nidmap:unable-read-file", true, opal_profile_file); close(fd); @@ -770,7 +770,7 @@ static int modex(opal_list_t *procs) return rc; } /* unpack the bytes */ - attrdata->bytes = malloc(attrdata->size); + attrdata->bytes = (uint8_t *) malloc(attrdata->size); if (ORTE_SUCCESS != (rc = opal_dss.unpack(&bobuf, attrdata->bytes, &attrdata->size, OPAL_BYTE))) { ORTE_ERROR_LOG(rc); return rc; diff --git a/orte/mca/plm/base/plm_base_launch_support.c b/orte/mca/plm/base/plm_base_launch_support.c index e225149a45..14ca2f57dd 100644 --- a/orte/mca/plm/base/plm_base_launch_support.c +++ b/orte/mca/plm/base/plm_base_launch_support.c @@ -1207,9 +1207,9 @@ void orte_plm_base_check_job_completed(orte_job_t *jdata) map = jdata->map; for( index = 0; index < map->num_nodes; index++ ) { - daemon = opal_pointer_array_get_item( map->nodes, index ); + daemon = (orte_node_t *) opal_pointer_array_get_item( map->nodes, index ); for( i = 0; i < (int)daemon->num_procs; i++ ) { - proc = opal_pointer_array_get_item(daemon->procs, i); + proc = (orte_proc_t *) opal_pointer_array_get_item(daemon->procs, i); if( (NULL != proc) && (proc->name.jobid == jdata->jobid) ) { daemon->slots_inuse--; } diff --git a/orte/util/nidmap.c b/orte/util/nidmap.c index 66eb0eff19..4f9530637f 100644 --- a/orte/util/nidmap.c +++ b/orte/util/nidmap.c @@ -428,7 +428,7 @@ int orte_util_encode_nodemap(opal_byte_object_t *boptr) bptr = &bo; while (0 < read(fd, &bo.size, sizeof(bo.size))) { /* this is the number of bytes in the byte object */ - bo.bytes = malloc(bo.size); + bo.bytes = (uint8_t *) malloc(bo.size); if (0 > read(fd, bo.bytes, bo.size)) { orte_show_help("help-orte-runtime.txt", "orte_nidmap:unable-read-file", true, opal_profile_file); close(fd); @@ -742,7 +742,7 @@ process_daemons: return rc; } /* unpack the bytes */ - attrdata->bytes = malloc(attrdata->size); + attrdata->bytes = (uint8_t *) malloc(attrdata->size); if (ORTE_SUCCESS != (rc = opal_dss.unpack(&bobuf, attrdata->bytes, &attrdata->size, OPAL_BYTE))) { ORTE_ERROR_LOG(rc); return rc;