mkconfig: Cast RAM size to unsigned to avoid complains about integer overflow in calculatino of CONFIG_RAM_END

This commit is contained in:
Gregory Nutt 2014-01-06 12:09:13 -06:00
parent aa1700895e
commit 72f00b9bb6
2 changed files with 5 additions and 2 deletions

View file

@ -6370,4 +6370,7 @@
Viewtool SSD1289-based LCD (untested on initial checkin) (2013-1-5).
* arch/arm/include/syscall.h and armv7-a/syscall.h: Add the syscall.h
header file needed for the Cortex-A architecture (2014-1-5).
* arch/arm/src/a1x/a1x_serial.c: Remove bad flow control logic. Add
missing interrupt handling logic for UART4-7 (2014-1-6).
* nuttx/tools/mkconfig.c: Cast size to unsigned in calculation of
CONFIG_RAM_END to avoid complains about integer overflow (2013-1-6).

View file

@ -182,7 +182,7 @@ int main(int argc, char **argv, char **envp)
printf(" * of RAM plus the RAM size.\n");
printf(" */\n\n");
printf("#ifndef CONFIG_RAM_END\n");
printf("# define CONFIG_RAM_END (CONFIG_RAM_START+CONFIG_RAM_SIZE)\n");
printf("# define CONFIG_RAM_END (CONFIG_RAM_START+(unsigned)CONFIG_RAM_SIZE)\n");
printf("#endif\n\n");
printf("#ifndef CONFIG_RAM_VEND\n");
printf("# define CONFIG_RAM_VEND (CONFIG_RAM_VSTART+CONFIG_RAM_SIZE)\n");