Merge "Supress implicit-fallthrough warnings."

This commit is contained in:
Zuul 2019-09-09 19:34:29 +00:00 committed by Gerrit Code Review
commit 1e7b6aa8d9
3 changed files with 12 additions and 0 deletions

View File

@ -833,6 +833,7 @@ struct nodeLinkClass::node* nodeLinkClass::getEventBaseNode ( libEvent_enum requ
return ptr ;
}
MTCE_FALLTHROUGH;
}
case VIM_HOST_DISABLED:
case VIM_HOST_ENABLED:
@ -846,6 +847,7 @@ struct nodeLinkClass::node* nodeLinkClass::getEventBaseNode ( libEvent_enum requ
return ptr ;
}
MTCE_FALLTHROUGH;
}
case BARBICAN_GET_SECRET:
case BARBICAN_READ_SECRET:

View File

@ -25,6 +25,12 @@
using namespace std;
#if defined(__GNUC__) && __GNUC__ >= 7
#define MTCE_FALLTHROUGH __attribute__ ((fallthrough));
#else
#define MTCE_FALLTHROUGH
#endif
/* Include base class definition header */
#include "nodeBase.h"
#include "hostUtil.h" /* for ... server_code and others */

View File

@ -3230,6 +3230,7 @@ int nodeLinkClass::offline_handler ( struct nodeLinkClass::node * node_ptr )
node_ptr->offlineStage = MTC_OFFLINE__SEND_MTCALIVE ;
/* fall through on start */
MTCE_FALLTHROUGH;
}
case MTC_OFFLINE__SEND_MTCALIVE:
{
@ -3870,6 +3871,7 @@ int nodeLinkClass::reset_handler ( struct nodeLinkClass::node * node_ptr )
}
node_ptr->power_action_retries = MTC_RESET_ACTION_RETRY_COUNT ;
/* the fall through is intentional */
MTCE_FALLTHROUGH;
}
case MTC_RESET__REQ_SEND:
{
@ -4692,6 +4694,7 @@ int nodeLinkClass::power_handler ( struct nodeLinkClass::node * node_ptr )
node_ptr->power_action_retries = MTC_POWER_ACTION_RETRY_COUNT ;
//the fall through to MTC_POWEROFF__REQ_SEND is intentional
MTCE_FALLTHROUGH;
}
case MTC_POWEROFF__REQ_SEND:
{
@ -4851,6 +4854,7 @@ int nodeLinkClass::power_handler ( struct nodeLinkClass::node * node_ptr )
node_ptr->power_action_retries = MTC_POWER_ACTION_RETRY_COUNT ;
powerStageChange ( node_ptr , MTC_POWERON__POWER_STATUS );
//the fall through to MTC_POWERON__REQ_SEND is intentional
MTCE_FALLTHROUGH;
}
case MTC_POWERON__POWER_STATUS:
{