Package: simulavr
Severity: minor
Tags: patch
User: [email protected]
Usertags: clang-ftbfs

Hello,

Using the rebuild infrastructure, your package fails to build with clang 
(instead of gcc).

We detected this kinf of error:
http://clang.debian.net/status.php?version=3.4.2&key=TAUTOLOGICAL-COMPARE

Full build log is available here:
http://clang.debian.net/logs/2014-06-16/simulavr_0.1.2.2-6.2_unstable_clang.log

Thanks,
Alexander

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- ./src/storage.h	2003-12-02 11:25:00.000000000 +0300
+++ ../simulavr-0.1.2.2-my/./src/storage.h	2014-07-12 23:47:14.609254666 +0400
@@ -46,7 +46,7 @@
 extern void storage_construct (Storage *stor, int base, int size);
 extern void storage_destroy (void *stor);
 
-extern inline uint8_t
+inline uint8_t
 storage_readb (Storage *stor, int addr)
 {
     int _addr = addr - stor->base;
@@ -60,7 +60,7 @@
     return stor->data[_addr];
 }
 
-extern inline uint16_t
+inline uint16_t
 storage_readw (Storage *stor, int addr)
 {
     int _addr = addr - stor->base;
--- ./src/vdevs.h	2004-01-30 10:09:56.000000000 +0300
+++ ../simulavr-0.1.2.2-my/./src/vdevs.h	2014-07-12 23:48:37.071817019 +0400
@@ -70,7 +70,7 @@
 
 extern void vdev_set_core (VDevice *dev, AvrClass *core);
 
-extern inline AvrClass *vdev_get_core (VDevice *dev)
+inline AvrClass *vdev_get_core (VDevice *dev)
 {
     return dev->core;
 }
--- ./src/disp/disp.c	2014-07-12 23:49:38.000000000 +0400
+++ ../simulavr-0.1.2.2-my/./src/disp/disp.c	2014-07-12 23:37:04.443884191 +0400
@@ -445,7 +445,8 @@
 void
 disp_set_sram_values (char *pkt)
 {
-    unsigned int addr, len;
+    int addr;
+    unsigned int len;
     unsigned char datum;
     int i;
 
--- ./src/avrcore.h	2014-07-12 23:49:38.000000000 +0400
+++ ../simulavr-0.1.2.2-my/./src/avrcore.h	2014-07-12 23:45:29.835080562 +0400
@@ -124,7 +124,7 @@
 
 /* Attach a Virtual Device to the core */
 
-extern inline void
+inline void
 avr_core_attach_vdev (AvrCore *core, uint16_t addr, char *name, VDevice *vdev,
                       int flags, uint8_t reset_value, uint8_t rd_mask,
                       uint8_t wr_mask)
@@ -134,19 +134,19 @@
                 wr_mask);
 }
 
-extern inline VDevice *
+inline VDevice *
 avr_core_get_vdev_by_name (AvrCore *core, char *name)
 {
     return mem_get_vdevice_by_name (core->mem, name);
 }
 
-extern inline VDevice *
+inline VDevice *
 avr_core_get_vdev_by_addr (AvrCore *core, int addr)
 {
     return mem_get_vdevice_by_addr (core->mem, addr);
 }
 
-extern inline void
+inline void
 avr_core_set_addr_name (AvrCore *core, int addr, char *name)
 {
     mem_set_addr_name (core->mem, addr, name);
@@ -155,13 +155,13 @@
 
 /* State Access Methods */
 
-extern inline int
+inline int
 avr_core_get_state (AvrCore *core)
 {
     return core->state;
 }
 
-extern inline void
+inline void
 avr_core_set_state (AvrCore *core, StateType state)
 {
     core->state = state;
@@ -169,14 +169,14 @@
 
 /* Sleep Mode Access Methods */
 
-extern inline void
+inline void
 avr_core_set_sleep_mode (AvrCore *core, int sleep_mode)
 {
     core->state = STATE_SLEEP;
     core->sleep_mode = ((unsigned int)1 << sleep_mode);
 }
 
-extern inline int
+inline int
 avr_core_get_sleep_mode (AvrCore *core)
 {
     return core->sleep_mode;
@@ -236,13 +236,13 @@
     sreg_set (core->sreg, v);
 }
 
-extern inline int
+inline int
 avr_core_sreg_get_bit (AvrCore *core, int b)
 {
     return sreg_get_bit (core->sreg, b);
 }
 
-extern inline void
+inline void
 avr_core_sreg_set_bit (AvrCore *core, int b, int v)
 {
     sreg_set_bit (core->sreg, b, v);
@@ -250,7 +250,7 @@
 
 /* RAMPZ Access Methods */
 
-extern inline uint8_t
+inline uint8_t
 avr_core_rampz_get (AvrCore *core)
 {
     if (core->rampz)
@@ -259,7 +259,7 @@
         return 0;
 }
 
-extern inline void
+inline void
 avr_core_rampz_set (AvrCore *core, uint8_t v)
 {
     if (core->rampz)
@@ -305,13 +305,13 @@
 
 /* Stack Access Methods */
 
-extern inline uint32_t
+inline uint32_t
 avr_core_stack_pop (AvrCore *core, int bytes)
 {
     return stack_pop (core->stack, bytes);
 }
 
-extern inline void
+inline void
 avr_core_stack_push (AvrCore *core, int bytes, uint32_t val)
 {
     stack_push (core->stack, bytes, val);
@@ -325,7 +325,7 @@
    values which go past zero. These should be interpreted as wrapping back
    around the last address in the flash. */
 
-extern inline void
+inline void
 _adjust_PC_to_max (AvrCore *core)
 {
     if (core->PC < 0)
@@ -337,7 +337,7 @@
 
 /* Program Counter Access Methods */
 
-extern inline int32_t
+inline int32_t
 avr_core_PC_size (AvrCore *core)
 {
     return core->PC_size;
@@ -363,7 +363,7 @@
     display_pc (core->PC);
 }
 
-extern inline void
+inline void
 avr_core_PC_incr (AvrCore *core, int val)
 {
     core->PC += val;
@@ -376,7 +376,7 @@
 extern void avr_core_irq_raise (AvrCore *core, int irq);
 extern void avr_core_irq_clear (AvrCore *core, IntVect *irq);
 
-extern inline void
+inline void
 avr_core_irq_clear_all (AvrCore *core)
 {
     dlist_delete_all (core->irq_pending);
@@ -399,13 +399,13 @@
 
 /* Methods for accessing CK and inst_CKS */
 
-extern inline uint64_t
+inline uint64_t
 avr_core_CK_get (AvrCore *core)
 {
     return core->CK;
 }
 
-extern inline void
+inline void
 avr_core_CK_incr (AvrCore *core)
 {
     core->CK++;
@@ -414,13 +414,13 @@
     display_clock (core->CK);
 }
 
-extern inline int
+inline int
 avr_core_inst_CKS_get (AvrCore *core)
 {
     return core->inst_CKS;
 }
 
-extern inline void
+inline void
 avr_core_inst_CKS_set (AvrCore *core, int val)
 {
     core->inst_CKS = val;
@@ -428,13 +428,13 @@
 
 /* Methods for handling clock callbacks */
 
-extern inline void
+inline void
 avr_core_clk_cb_add (AvrCore *core, CallBack *cb)
 {
     core->clk_cb = callback_list_add (core->clk_cb, cb);
 }
 
-extern inline void
+inline void
 avr_core_clk_cb_exec (AvrCore *core)
 {
     core->clk_cb =
@@ -443,13 +443,13 @@
 
 /* Methods for handling asynchronous callbacks */
 
-extern inline void
+inline void
 avr_core_async_cb_add (AvrCore *core, CallBack *cb)
 {
     core->async_cb = callback_list_add (core->async_cb, cb);
 }
 
-extern inline void
+inline void
 avr_core_async_cb_exec (AvrCore *core)
 {
     core->async_cb =
--- ./src/decoder.h	2003-12-02 11:25:00.000000000 +0300
+++ ../simulavr-0.1.2.2-my/./src/decoder.h	2014-07-12 23:49:04.855332722 +0400
@@ -48,7 +48,7 @@
 extern int  avr_op_UNKNOWN (AvrCore *core, uint16_t opcode, unsigned int arg1,
                             unsigned int arg2);
 
-extern inline struct opcode_info *
+inline struct opcode_info *
 decode_opcode (uint16_t opcode)
 {
     struct opcode_info *opi;
--- ./src/register.h	2004-01-29 09:34:50.000000000 +0300
+++ ../simulavr-0.1.2.2-my/./src/register.h	2014-07-12 23:46:40.213853968 +0400
@@ -84,26 +84,26 @@
 extern void sreg_construct (SREG *sreg);
 extern void sreg_destroy (void *sreg);
 
-extern inline uint8_t
+inline uint8_t
 sreg_get (SREG *sreg)
 {
     return sreg->sreg.reg;
 }
 
-extern inline void
+inline void
 sreg_set (SREG *sreg, uint8_t val)
 {
     sreg->sreg.reg = val;
     display_io_reg (SREG_IO_REG, sreg->sreg.reg);
 }
 
-extern inline uint8_t
+inline uint8_t
 sreg_get_bit (SREG *sreg, int bit)
 {
     return !!(sreg->sreg.reg & (1 << bit));
 }
 
-extern inline void
+inline void
 sreg_set_bit (SREG *sreg, int bit, int val)
 {
     sreg->sreg.reg = set_bit_in_byte (sreg->sreg.reg, bit, val);
@@ -134,7 +134,7 @@
 extern void gpwr_construct (GPWR *gpwr);
 extern void gpwr_destroy (void *gpwr);
 
-extern inline uint8_t
+inline uint8_t
 gpwr_get (GPWR *gpwr, int reg)
 {
 #if defined(CHECK_REGISTER_BOUNDS)
@@ -145,7 +145,7 @@
     return gpwr->reg[reg];
 }
 
-extern inline void
+inline void
 gpwr_set (GPWR *gpwr, int reg, uint8_t val)
 {
 #if defined(CHECK_REGISTER_BOUNDS)
--- ./src/utils.h	2003-12-01 10:35:54.000000000 +0300
+++ ../simulavr-0.1.2.2-my/./src/utils.h	2014-07-12 23:47:47.500681380 +0400
@@ -47,13 +47,13 @@
  *
 \****************************************************************************/
 
-extern inline uint8_t
+inline uint8_t
 set_bit_in_byte (uint8_t src, int bit, int val)
 {
     return ((src & ~(1 << bit)) | ((val != 0) << bit));
 }
 
-extern inline uint16_t
+inline uint16_t
 set_bit_in_word (uint16_t src, int bit, int val)
 {
     return ((src & ~(1 << bit)) | ((val != 0) << bit));
--- ./src/adc.c	2004-03-13 22:55:34.000000000 +0300
+++ ../simulavr-0.1.2.2-my/./src/adc.c	2014-07-12 23:38:42.190182097 +0400
@@ -181,14 +181,14 @@
 
         if ((val & mask_ADSC) && (val & mask_ADEN))
         {
-            if ((adc->intr_cb == NULL))
+            if (adc->intr_cb == NULL)
             {
                 /* we need to install the intr_cb function */
                 cb = callback_new (adc_intr_cb, (AvrClass *)adc);
                 adc->intr_cb = cb;
                 avr_core_async_cb_add ((AvrCore *)vdev_get_core (dev), cb);
             }
-            if ((adc_d->clk_cb == NULL))
+            if (adc_d->clk_cb == NULL)
             {
                 /* we need to install the clk_cb function */
                 cb = callback_new (adc_clk_incr_cb, (AvrClass *)adc_d);
--- ./src/disp-vcd/disp.c	2014-07-12 23:49:38.000000000 +0400
+++ ../simulavr-0.1.2.2-my/./src/disp-vcd/disp.c	2014-07-12 23:37:55.966986976 +0400
@@ -167,7 +167,8 @@
 void
 disp_set_sram_values (char *pkt)
 {
-    unsigned int addr, len;
+    int addr;
+    unsigned int len;
     unsigned char datum;
     int i;
 
--- ./src/flash.h	2003-12-02 11:25:00.000000000 +0300
+++ ../simulavr-0.1.2.2-my/./src/flash.h	2014-07-12 23:48:12.244249758 +0400
@@ -46,7 +46,7 @@
 extern int flash_get_size (Flash *flash);
 extern void flash_dump_core (Flash *flash, FILE * f_core);
 
-extern inline uint16_t
+inline uint16_t
 flash_read (Flash *flash, int addr)
 {
     return storage_readw ((Storage *)flash, addr * 2);

Reply via email to