Fix CRC cast compiler warning
authorAsbjørn Sloth Tønnesen <asbjorn@asbjorn.biz>
Fri, 14 Jan 2011 02:27:59 +0000 (02:27 +0000)
committerAsbjørn Sloth Tønnesen <asbjorn@asbjorn.biz>
Fri, 14 Jan 2011 02:27:59 +0000 (02:27 +0000)
Signed-off-by: Asbjørn Sloth Tønnesen <asbjorn@asbjorn.biz>

src/boards/lpc1768/startup.c
tools/lpcrc/lpcrc.sh

index 66eab26..0888b27 100644 (file)
@@ -95,6 +95,8 @@ extern int main(void);
 //*****************************************************************************
 static unsigned long pulStack[64];
 
+#define CRC_CHECKSUM 0xeffffcbf
+
 //*****************************************************************************
 //
 // The vector table.  Note that the proper constructs must be placed on this to
@@ -112,7 +114,7 @@ void (* const g_pfnVectors[])(void) =
     MemManage_Handler,                      // The MPU fault handler
     BusFault_Handler,                       // The bus fault handler
     UsageFault_Handler,                     // The usage fault handler
-    0xeffffcbf,                                    // Interrupt CRC
+    (void *) CRC_CHECKSUM,                 // Interrupt CRC
     0,                                      // Reserved
     0,                                      // Reserved
     0,                                      // Reserved
index ee36dd5..1bff216 100755 (executable)
@@ -11,7 +11,7 @@ echo "$crcoutput" | grep -q differs
 if [ $? -eq 0 ] ; then
        crc=$(echo "$crcoutput" | grep new_crc | cut -d' ' -f2)
        sed -i -e \
-         's/^\(\s\+0x\)[a-f0-9]\{8\}\(,\s\+\/\/\ Interrupt CRC\)/\1'$crc'\2/g' \
+         's/^\(#define CRC_CHECKSUM 0x\)[a-f0-9]\{8\}$/\1'$crc'/g' \
          $source
        make crc
 fi