[mpich-devel] warning: returning 'uint32_t *' (aka 'unsigned int *') from a function with result type 'int *' converts between pointers to integer types with different sign

Jeff Hammond jeff.science at gmail.com
Mon Mar 9 20:02:18 CDT 2015


See below, but the propriety of this cast can be verified in source
without a compiler :-)

Jeff

## Local Branches:

* master

## Most Recent Commit:

commit 957ceec598103d8d643c9345512ae8ad4e88e993
Author: Ken Raffenetti <raffenet at mcs.anl.gov>

    testsuite: remove leading spaces in testlist files

jrhammon-mac01:build jrhammon$ head config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by MPICH configure 3.2b1, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ../configure CC=icc CXX=icpc FC=ifort F77=ifort --enable-fortran
--enable-threads=runtime --enable-g=dbg --with-pm=hydra
--prefix=/opt/mpich/dev/intel/default --enable-wrapper-rpath
--enable-static --enable-shared

jrhammon-mac01:build jrhammon$ icc --version
icc (ICC) 15.0.1 20141022
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.



On Mon, Mar 9, 2015 at 5:58 PM, "Antonio J. Peña" <apenya at mcs.anl.gov> wrote:
>
> Hi Jeff,
>
> Please also report compiler, compiler version, and MPICH version.
>
> Best,
>   Toni
>
>
>
> On 03/09/2015 07:53 PM, Jeff Hammond wrote:
>>
>> I know some of you like warning-clean builds...
>>
>> ../src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c:20:14: warning:
>> assigning to 'uint32_t *' (aka 'unsigned int *') from 'int *'
>>        converts between pointers to integer types with different sign
>> [-Wpointer-sign]
>>      bitarray = (int *) MPIU_Malloc(sizeof(int) * bitarray_size);
>>               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> ../src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c:24:16: warning:
>> returning 'uint32_t *' (aka 'unsigned int *') from a function
>>        with result type 'int *' converts between pointers to integer
>> types with different sign [-Wpointer-sign]
>>          return bitarray;
>>                 ^~~~~~~~
>> ../src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c:46:12: warning:
>> returning 'uint32_t *' (aka 'unsigned int *') from a function
>>        with result type 'int *' converts between pointers to integer
>> types with different sign [-Wpointer-sign]
>>      return bitarray;
>>             ^~~~~~~~
>> ../src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c:107:14: warning:
>> assigning to 'uint32_t *' (aka 'unsigned int *') from
>>        'int *' converts between pointers to integer types with
>> different sign [-Wpointer-sign]
>>      bitarray = group_to_bitarray(local_fail, comm_ptr);
>>               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 4 warnings generated.
>>
>> Best,
>>
>> Jeff
>>
>
>
> --
> Antonio J. Peña
> Postdoctoral Appointee
> Mathematics and Computer Science Division
> Argonne National Laboratory
> 9700 South Cass Avenue, Bldg. 240, Of. 3148
> Argonne, IL 60439-4847
> apenya at mcs.anl.gov
> www.mcs.anl.gov/~apenya
>
> _______________________________________________
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/devel



-- 
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/


More information about the devel mailing list