I’m trying to figure out why all of a sudden I’m getting build failures on my BSP. The first failure is this:
In file included from ../../../cpukit/include/rtems/score/smpimpl.h:43,
from ../../../bsps/shared/start/bspfatal-default.c:43:
../../../cpukit/include/rtems/score/processormaskimpl.h: In function '_Processor_mask_To_cpu_set_t':
../../../cpukit/include/rtems/score/processormaskimpl.h:409:5: error: pointer targets in passing argument 1 of '_Processor_mask_Copy' differ in signedness [-Werror=pointer-sign]
409 | &dst->__bits[ 0 ],
| ^~~~~~~~~~~~~~~~~
| |
| long int *
../../../cpukit/include/rtems/score/processormaskimpl.h:380:24: note: expected 'long unsigned int *' but argument is of type 'long int *'
380 | unsigned long *dst,
| ~~~~~~~~~~~~~~~~~~~~~^~~
../../../cpukit/include/rtems/score/processormaskimpl.h:411:5: error: pointer targets in passing argument 3 of '_Processor_mask_Copy' differ in signedness [-Werror=pointer-sign]
411 | &src->__bits[ 0 ],
| ^~~~~~~~~~~~~~~~~
| |
| const long int *
../../../cpukit/include/rtems/score/processormaskimpl.h:382:24: note: expected 'const long unsigned int *' but argument is of type 'const long int *'
382 | const unsigned long *src,
| ~~~~~~~~~~~~~~~~~~~~~^~~
../../../cpukit/include/rtems/score/processormaskimpl.h: In function '_Processor_mask_From_cpu_set_t':
../../../cpukit/include/rtems/score/processormaskimpl.h:439:5: error: pointer targets in passing argument 1 of '_Processor_mask_Copy' differ in signedness [-Werror=pointer-sign]
439 | &dst->__bits[ 0 ],
| ^~~~~~~~~~~~~~~~~
| |
| long int *
../../../cpukit/include/rtems/score/processormaskimpl.h:380:24: note: expected 'long unsigned int *' but argument is of type 'long int *'
380 | unsigned long *dst,
| ~~~~~~~~~~~~~~~~~~~~~^~~
../../../cpukit/include/rtems/score/processormaskimpl.h:441:5: error: pointer targets in passing argument 3 of '_Processor_mask_Copy' differ in signedness [-Werror=pointer-sign]
441 | &src->__bits[ 0 ],
| ^~~~~~~~~~~~~~~~~
| |
| const long int *
../../../cpukit/include/rtems/score/processormaskimpl.h:382:24: note: expected 'const long unsigned int *' but argument is of type 'const long int *'
382 | const unsigned long *src,
| ~~~~~~~~~~~~~~~~~~~~~^~~
cc1: all warnings being treated as errors
And the compiler isn’t wrong, the code in the .c file has mismatched declarations compared to the .h file. Not in a way that c cares about (signed vs unsigned longs being cast to pointers) but certainly in a way that setting warnings to errors does care about.
But I haven’t changed anything in cpukit and I’m not sure why my BSP is activating what looks like SMP code when it doesn’t do SMP.
The bug it is complaining about is in processormaskimpl.h where it is supposed to make a copy set and it passes a pointer to dst which is declared as a cpu_set_t which is typedef’d as a _cpuset from a FreeBSD header define using __BITSET_DEFINE(_cpuset, CPU_SETSIZE)
None of this is stuff I’ve touched. So I’m really confused why it’s talking about it now.