# compiling warnings

**URL:** <https://forums.freertos.org/t/compiling-warnings/6741>\
**Category:** Kernel\
**Created:** [August 12, 2017, 11:14pm UTC](https://forums.freertos.org/t/compiling-warnings/6741 "2017-08-12T23:14:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [August 12, 2017, 11:14pm UTC](https://forums.freertos.org/t/compiling-warnings/6741/1 "2017-08-12T23:14:47Z")

</div>

**[dmitri17](https://sourceforge.net/u/dmitri17/)** wrote on [Saturday, August 12, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/bf8d501a/#b279):

how to fix it  
In function ‘prvHeapInit’:  
…/…/Source/portable/MemMang/heap\_2.c:297:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]  
pucAlignedHeap =(uint8\_t\*)(((portPOINTER\_SIZE\_TYPE)&ucHeap[portBYTE\_ALIGNMENT])&(~((portPOINTER\_SIZE\_TYPE)portBYTE\_ALIGNMENT\_MASK)));

---

<div class="post-metadata">

**Author:** ![richard-damon](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/richard-damon/32/38_2.png) [@richard-damon](https://forums.freertos.org/u/richard-damon)\
**Post date:** [August 13, 2017, 1:06am UTC](https://forums.freertos.org/t/compiling-warnings/6741/2 "2017-08-13T01:06:40Z")

</div>

**[richard\_damon](https://sourceforge.net/u/richard_damon/)** wrote on [Sunday, August 13, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/bf8d501a/#daaf):

Which port are you using?

Sounds like it has a wrong definition for portPOINTER\_SIZE\_TYPE

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [August 13, 2017, 1:11am UTC](https://forums.freertos.org/t/compiling-warnings/6741/3 "2017-08-13T01:11:25Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Sunday, August 13, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/bf8d501a/#daaf/5e36):

Yes - or no definition at all. Only newer ports have the definition.  
The older 16-bit ports, which have different sizes as per the warning,  
and don’t have the definition, can generate this warning. The warning  
can be ignored, or you can add portPOINTER\_SIZE\_TYPE to your portmacro.h  
file.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [August 13, 2017, 9:23am UTC](https://forums.freertos.org/t/compiling-warnings/6741/4 "2017-08-13T09:23:31Z")

</div>

**[dmitri17](https://sourceforge.net/u/dmitri17/)** wrote on [Sunday, August 13, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/bf8d501a/#0eb0):

Thank you all for the help me.Real Time Engineers ltd suggested a good solution.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [August 13, 2017, 9:30am UTC](https://forums.freertos.org/t/compiling-warnings/6741/5 "2017-08-13T09:30:58Z")

</div>

**[dmitri17](https://sourceforge.net/u/dmitri17/)** wrote on [Sunday, August 13, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/bf8d501a/#daaf/e6c3):

avr-gcc (GCC) 4.9.2  
FreeRTOSv9.0.0  
-mmcu=atmega328p
