Branch: Tag:

2014-05-29

2014-05-29 15:17:05 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Build: Reduce complaint about unused functions.

We don't care if inline functions defined in the header files aren't
used in all files that include them...

Reduces the number of build warnings to reasonable levels.

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