antirez / antirez/sds

Use attribute 'warn_unused_result'

Ouverte
#11 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C
Étoiles
5.6k
Forks
510
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.