Document the ATTRIBUTE_FALLTHROUGH macro

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko 2019-10-15 13:36:47 +02:00
parent da367c0f9b
commit dd3738acc4
1 changed files with 7 additions and 0 deletions

View File

@ -135,6 +135,13 @@
# endif # endif
#endif #endif
/**
*
* ATTRIBUTE_FALLTHROUGH
*
* silence the compiler warning when falling through a switch case
*
*/
#ifndef ATTRIBUTE_FALLTHROUGH #ifndef ATTRIBUTE_FALLTHROUGH
# if __GNUC_PREREQ (7, 0) # if __GNUC_PREREQ (7, 0)
# define ATTRIBUTE_FALLTHROUGH __attribute__((fallthrough)) # define ATTRIBUTE_FALLTHROUGH __attribute__((fallthrough))