Eliminate some warnings

This commit is contained in:
Gregory Nutt 2016-06-13 14:15:54 -06:00
parent 0f249016a0
commit 93e7b5d7a0
2 changed files with 8 additions and 19 deletions

View File

@ -41,6 +41,7 @@
****************************************************************************************************/ ****************************************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <nuttx/compiler.h>
/**************************************************************************************************** /****************************************************************************************************
* Pre-processor Definitions * Pre-processor Definitions

View File

@ -50,18 +50,6 @@
#include "up_internal.h" #include "up_internal.h"
#include "up_arch.h" #include "up_arch.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
@ -91,18 +79,18 @@ void up_initial_state(struct tcb_s *tcb)
/* Set the initial stack pointer to the "base" of the allocated stack */ /* Set the initial stack pointer to the "base" of the allocated stack */
xcp->regs[REG_SPH] = (uint8_t)((uint16_t)tcb->adj_stack_ptr >> 8); xcp->regs[REG_SPH] = (uint8_t)((uintptr_t)tcb->adj_stack_ptr >> 8);
xcp->regs[REG_SPL] = (uint8_t)((uint16_t)tcb->adj_stack_ptr & 0xff); xcp->regs[REG_SPL] = (uint8_t)((uintptr_t)tcb->adj_stack_ptr & 0xff);
/* Save the task entry point */ /* Save the task entry point */
#if !defined(REG_PC2) #if !defined(REG_PC2)
xcp->regs[REG_PC0] = (uint8_t)((uint16_t)tcb->start >> 8); xcp->regs[REG_PC0] = (uint8_t)((uintptr_t)tcb->start >> 8);
xcp->regs[REG_PC1] = (uint8_t)((uint16_t)tcb->start & 0xff); xcp->regs[REG_PC1] = (uint8_t)((uintptr_t)tcb->start & 0xff);
#else #else
xcp->regs[REG_PC0] = (uint8_t)((uint32_t)tcb->start >> 16); xcp->regs[REG_PC0] = (uint8_t)((uintptr_t)tcb->start >> 16);
xcp->regs[REG_PC1] = (uint8_t)((uint32_t)tcb->start >> 8); xcp->regs[REG_PC1] = (uint8_t)((uintptr_t)tcb->start >> 8);
xcp->regs[REG_PC2] = (uint8_t)((uint32_t)tcb->start & 0xff); xcp->regs[REG_PC2] = (uint8_t)((uintptr_t)tcb->start & 0xff);
#endif #endif
/* Enable or disable interrupts, based on user configuration */ /* Enable or disable interrupts, based on user configuration */