LPC11C24 warnings

This commit is contained in:
Pavel Kirienko
2014-08-29 02:20:08 +04:00
parent 8b73a68de8
commit 4755130311
6 changed files with 13 additions and 5 deletions
+2 -2
View File
@@ -17,13 +17,13 @@ int Frame::getMaxPayloadLen() const
{
case TransferTypeMessageBroadcast:
{
return sizeof(payload_);
return int(sizeof(payload_));
}
case TransferTypeServiceResponse:
case TransferTypeServiceRequest:
case TransferTypeMessageUnicast:
{
return sizeof(payload_) - 1;
return int(sizeof(payload_)) - 1;
}
default:
{
@@ -410,6 +410,8 @@ void canErrorCallback(uint32_t error_info)
}
}
void CAN_IRQHandler();
void CAN_IRQHandler()
{
uavcan_lpc11c24::last_irq_utc_timestamp = uavcan_lpc11c24::clock::getUtcUSecFromCanInterrupt();
@@ -159,6 +159,8 @@ SystemClock& SystemClock::instance()
extern "C"
{
void SysTick_Handler();
void SysTick_Handler()
{
using namespace uavcan_lpc11c24::clock;
@@ -11,7 +11,7 @@ CSRC := $(wildcard lpc_chip_11cxx_lib/src/*.c) \
DEF = -DFW_VERSION_MAJOR=1 -DFW_VERSION_MINOR=0
INC = -Isrc/sys \
-Ilpc_chip_11cxx_lib/inc
-isystem lpc_chip_11cxx_lib/inc
#
# UAVCAN library
@@ -52,7 +52,7 @@ DEF += -DNDEBUG -DCHIP_LPC11CXX -DCORE_M0 -DTHUMB_NO_INTERWORKING -U__STRICT_ANS
FLAGS = -mthumb -mcpu=cortex-m0 -mno-thumb-interwork -flto -Os -g3 -Wall -Wextra -Werror -ffunction-sections \
-fdata-sections -fno-common -fno-exceptions -fno-unwind-tables -fno-stack-protector -fomit-frame-pointer \
-ftracer -ftree-loop-distribute-patterns -frename-registers -freorder-blocks -fconserve-stack \
-Wfloat-equal
-Wfloat-equal -Wconversion -Wsign-conversion -Wmissing-declarations
C_CPP_FLAGS = $(FLAGS) -MD -MP -MF $(DEPDIR)/$(@F).d
@@ -93,7 +93,7 @@ void init()
void reverse(char* s)
{
for (int i = 0, j = std::strlen(s) - 1; i < j; i++, j--)
for (int i = 0, j = int(std::strlen(s)) - 1; i < j; i++, j--)
{
const char c = s[i];
s[i] = s[j];
@@ -7,6 +7,10 @@
#include <unistd.h>
#include <sys/types.h>
#if __GNUC__
# pragma GCC diagnostic ignored "-Wmissing-declarations"
#endif
void* __dso_handle;
void* operator new(size_t)