Branch: Tag:

2015-04-01

2015-04-01 12:21:23 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Build: Support compilation with compilers other than gcc again.

Replaced all uses of __attribute__((unused)) with PIKE_ATTRIBUTE_UNUSED.

560:    debug_check_type_hint ((SVALS), (NUM), (TYPE_HINT))      #ifdef DEBUG_MALLOC - static INLINE struct svalue __attribute__((unused)) *dmalloc_check_svalue(struct svalue *s, char *l) + static INLINE struct svalue PIKE_UNUSED_ATTRIBUTE *dmalloc_check_svalue(struct svalue *s, char *l)   {    if(s && REFCOUNTED_TYPE(TYPEOF(*s)))    debug_malloc_update_location(s->u.refs,l);    return s;   }    - static INLINE struct svalue __attribute__((unused)) *dmalloc_check_svalues(struct svalue *s, size_t num, char *l) + static INLINE struct svalue PIKE_UNUSED_ATTRIBUTE *dmalloc_check_svalues(struct svalue *s, size_t num, char *l)   {    while (num--) dmalloc_check_svalue (s + num, l);    return s;   }    - static INLINE union anything __attribute__((unused)) *dmalloc_check_union(union anything *u,int type, char * l) + static INLINE union anything PIKE_UNUSED_ATTRIBUTE *dmalloc_check_union(union anything *u,int type, char * l)   {    if(u && REFCOUNTED_TYPE(type))    debug_malloc_update_location(u->refs,l);
592:   #endif /* !DEBUG_MALLOC */      /* To be used for type checking in macros. */ - static INLINE struct array __attribute__((unused)) *pass_array (struct array *a) {return a;} - static INLINE struct mapping __attribute__((unused)) *pass_mapping (struct mapping *m) {return m;} - static INLINE struct multiset __attribute__((unused)) *pass_multiset (struct multiset *l) {return l;} - static INLINE struct object __attribute__((unused)) *pass_object (struct object *o) {return o;} - static INLINE struct program __attribute__((unused)) *pass_program (struct program *p) {return p;} - static INLINE struct pike_string __attribute__((unused)) *pass_string (struct pike_string *s) {return s;} - static INLINE struct pike_type __attribute__((unused)) *pass_type (struct pike_type *t) {return t;} - static INLINE struct callable __attribute__((unused)) *pass_callable (struct callable *c) {return c;} + static INLINE struct array PIKE_UNUSED_ATTRIBUTE *pass_array (struct array *a) {return a;} + static INLINE struct mapping PIKE_UNUSED_ATTRIBUTE *pass_mapping (struct mapping *m) {return m;} + static INLINE struct multiset PIKE_UNUSED_ATTRIBUTE *pass_multiset (struct multiset *l) {return l;} + static INLINE struct object PIKE_UNUSED_ATTRIBUTE *pass_object (struct object *o) {return o;} + static INLINE struct program PIKE_UNUSED_ATTRIBUTE *pass_program (struct program *p) {return p;} + static INLINE struct pike_string PIKE_UNUSED_ATTRIBUTE *pass_string (struct pike_string *s) {return s;} + static INLINE struct pike_type PIKE_UNUSED_ATTRIBUTE *pass_type (struct pike_type *t) {return t;} + static INLINE struct callable PIKE_UNUSED_ATTRIBUTE *pass_callable (struct callable *c) {return c;}      #else /* !PIKE_DEBUG */   
869:    TYPE_FIELD hint,    struct processing *p);    - static INLINE TYPE_FIELD __attribute__((unused)) BITOF(struct svalue sv) { + static INLINE TYPE_FIELD PIKE_UNUSED_ATTRIBUTE BITOF(struct svalue sv) {    if (TYPEOF(sv) >= sizeof(TYPE_FIELD) * 8) {    return BIT_MIXED | BIT_UNFINISHED;    }
892:    } while (0)      #ifdef DEBUG_MALLOC - static INLINE TYPE_FIELD __attribute__((unused)) dmalloc_gc_mark_svalues (struct svalue *s, size_t num, char *l) + static INLINE TYPE_FIELD PIKE_UNUSED_ATTRIBUTE dmalloc_gc_mark_svalues (struct svalue *s, size_t num, char *l)    {return real_gc_mark_svalues (dmalloc_check_svalues (s, num, l), num);}   #define gc_mark_svalues(S, NUM) dmalloc_gc_mark_svalues ((S), (NUM), DMALLOC_LOCATION()) - static INLINE TYPE_FIELD __attribute__((unused)) dmalloc_gc_cycle_check_svalues (struct svalue *s, size_t num, char *l) + static INLINE TYPE_FIELD PIKE_UNUSED_ATTRIBUTE dmalloc_gc_cycle_check_svalues (struct svalue *s, size_t num, char *l)    {return real_gc_cycle_check_svalues (dmalloc_check_svalues (s, num, l), num);}   #define gc_cycle_check_svalues(S, NUM) dmalloc_gc_cycle_check_svalues ((S), (NUM), DMALLOC_LOCATION())   #else