diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2023-10-11 00:15:32 +0300 | 
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2023-10-12 21:23:18 +0300 | 
| commit | 7d67b9ff28d09de58c632f80ef7d330e45e698f6 (patch) | |
| tree | 16c8afc9dc80d70951f83d2f1182ace0edc7ee49 /watchfrr/watchfrr.c | |
| parent | 9bc4d9eaec92589deda092bd867054e25e64be3f (diff) | |
build: add -Wimplicit-fallthrough
Also:
- replace all /* fallthrough */ comments with portable fallthrough;
pseudo keyword to accomodate both gcc and clang
- add missing break; statements as required by older versions of gcc
- cleanup some code to remove unnecessary fallthrough
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'watchfrr/watchfrr.c')
| -rw-r--r-- | watchfrr/watchfrr.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/watchfrr/watchfrr.c b/watchfrr/watchfrr.c index 89199da1af..34acf683ef 100644 --- a/watchfrr/watchfrr.c +++ b/watchfrr/watchfrr.c @@ -908,7 +908,7 @@ static void phase_check(void)  			"Phased restart: all routing daemon stop jobs have completed.");  		set_phase(PHASE_WAITING_DOWN); -	/*FALLTHRU*/ +		fallthrough;  	case PHASE_WAITING_DOWN:  		if (gs.numdown + IS_UP(gs.special) < gs.numdaemons)  			break; @@ -918,7 +918,7 @@ static void phase_check(void)  			1);  		set_phase(PHASE_ZEBRA_RESTART_PENDING); -	/*FALLTHRU*/ +		fallthrough;  	case PHASE_ZEBRA_RESTART_PENDING:  		if (gs.special->restart.pid)  			break; @@ -927,7 +927,7 @@ static void phase_check(void)  			  gs.special->name);  		set_phase(PHASE_WAITING_ZEBRA_UP); -	/*FALLTHRU*/ +		fallthrough;  	case PHASE_WAITING_ZEBRA_UP:  		if (!IS_UP(gs.special))  			break;  | 
