Use attribute 'warn_unused_result'
Aperta
- Lingua principale
- C
- Stelle
- 5.6k
- Fork
- 510
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hi Salvatore.
Thanks for releasing this. You should consider using the GCC (and compatible) attribute "warn_unused_result" on the functions that may call realloc().
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#index-g_t_0040code_007bwarn_005funused_005fresult_007d-attribute-2997
It's not a perfect backstop, but it can be very helpful in calling attention to usage that would otherwise be a very subtle error.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.