Browse Source

[build] Avoid implicit-fallthrough warnings on GCC 7

Reported-by: Vinson Lee <vlee@freedesktop.org>
Reported-by: Liang Yan <lyan@suse.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 years ago
parent
commit
5f85cbb9ee

+ 2
- 0
src/arch/x86/image/bzimage.c View File

@@ -282,9 +282,11 @@ static int bzimage_parse_cmdline ( struct image *image,
282 282
 		case 'G':
283 283
 		case 'g':
284 284
 			bzimg->mem_limit <<= 10;
285
+			/* Fall through */
285 286
 		case 'M':
286 287
 		case 'm':
287 288
 			bzimg->mem_limit <<= 10;
289
+			/* Fall through */
288 290
 		case 'K':
289 291
 		case 'k':
290 292
 			bzimg->mem_limit <<= 10;

+ 1
- 0
src/drivers/infiniband/golan.c View File

@@ -1956,6 +1956,7 @@ static inline void golan_handle_port_event(struct golan *golan, struct golan_eqe
1956 1956
 	case GOLAN_PORT_CHANGE_SUBTYPE_CLIENT_REREG:
1957 1957
 	case GOLAN_PORT_CHANGE_SUBTYPE_ACTIVE:
1958 1958
 		golan_ib_update ( ibdev );
1959
+		/* Fall through */
1959 1960
 	case GOLAN_PORT_CHANGE_SUBTYPE_DOWN:
1960 1961
 	case GOLAN_PORT_CHANGE_SUBTYPE_LID:
1961 1962
 	case GOLAN_PORT_CHANGE_SUBTYPE_PKEY:

+ 2
- 0
src/drivers/net/ath/ath9k/ath9k_ar5008_phy.c View File

@@ -640,12 +640,14 @@ static void ar5008_hw_init_chain_masks(struct ath_hw *ah)
640 640
 	case 0x5:
641 641
 		REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP,
642 642
 			    AR_PHY_SWAP_ALT_CHAIN);
643
+		/* Fall through */
643 644
 	case 0x3:
644 645
 		if (ah->hw_version.macVersion == AR_SREV_REVISION_5416_10) {
645 646
 			REG_WRITE(ah, AR_PHY_RX_CHAINMASK, 0x7);
646 647
 			REG_WRITE(ah, AR_PHY_CAL_CHAINMASK, 0x7);
647 648
 			break;
648 649
 		}
650
+		/* Fall through */
649 651
 	case 0x1:
650 652
 	case 0x2:
651 653
 	case 0x7:

+ 1
- 0
src/drivers/net/ath/ath9k/ath9k_ar9002_phy.c View File

@@ -122,6 +122,7 @@ static int ar9002_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
122 122
 				aModeRefSel = 2;
123 123
 			if (aModeRefSel)
124 124
 				break;
125
+			/* Fall through */
125 126
 		case 1:
126 127
 		default:
127 128
 			aModeRefSel = 0;

+ 1
- 0
src/drivers/net/ath/ath9k/ath9k_ar9003_phy.c View File

@@ -539,6 +539,7 @@ void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx)
539 539
 	case 0x5:
540 540
 		REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP,
541 541
 			    AR_PHY_SWAP_ALT_CHAIN);
542
+		/* Fall through */
542 543
 	case 0x3:
543 544
 	case 0x1:
544 545
 	case 0x2:

+ 1
- 0
src/drivers/net/igbvf/igbvf_vf.c View File

@@ -357,6 +357,7 @@ s32 igbvf_promisc_set_vf(struct e1000_hw *hw, enum e1000_promisc_type type)
357 357
 		break;
358 358
 	case e1000_promisc_enabled:
359 359
 		msgbuf |= E1000_VF_SET_PROMISC_MULTICAST;
360
+		/* Fall through */
360 361
 	case e1000_promisc_unicast:
361 362
 		msgbuf |= E1000_VF_SET_PROMISC_UNICAST;
362 363
 	case e1000_promisc_disabled:

+ 12
- 0
src/drivers/net/tg3/tg3_hw.c View File

@@ -2518,28 +2518,40 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
2518 2518
 	switch (limit) {
2519 2519
 	case 16:
2520 2520
 		tw32(MAC_RCV_RULE_15,  0); tw32(MAC_RCV_VALUE_15,  0);
2521
+		/* Fall through */
2521 2522
 	case 15:
2522 2523
 		tw32(MAC_RCV_RULE_14,  0); tw32(MAC_RCV_VALUE_14,  0);
2524
+		/* Fall through */
2523 2525
 	case 14:
2524 2526
 		tw32(MAC_RCV_RULE_13,  0); tw32(MAC_RCV_VALUE_13,  0);
2527
+		/* Fall through */
2525 2528
 	case 13:
2526 2529
 		tw32(MAC_RCV_RULE_12,  0); tw32(MAC_RCV_VALUE_12,  0);
2530
+		/* Fall through */
2527 2531
 	case 12:
2528 2532
 		tw32(MAC_RCV_RULE_11,  0); tw32(MAC_RCV_VALUE_11,  0);
2533
+		/* Fall through */
2529 2534
 	case 11:
2530 2535
 		tw32(MAC_RCV_RULE_10,  0); tw32(MAC_RCV_VALUE_10,  0);
2536
+		/* Fall through */
2531 2537
 	case 10:
2532 2538
 		tw32(MAC_RCV_RULE_9,  0); tw32(MAC_RCV_VALUE_9,  0);
2539
+		/* Fall through */
2533 2540
 	case 9:
2534 2541
 		tw32(MAC_RCV_RULE_8,  0); tw32(MAC_RCV_VALUE_8,  0);
2542
+		/* Fall through */
2535 2543
 	case 8:
2536 2544
 		tw32(MAC_RCV_RULE_7,  0); tw32(MAC_RCV_VALUE_7,  0);
2545
+		/* Fall through */
2537 2546
 	case 7:
2538 2547
 		tw32(MAC_RCV_RULE_6,  0); tw32(MAC_RCV_VALUE_6,  0);
2548
+		/* Fall through */
2539 2549
 	case 6:
2540 2550
 		tw32(MAC_RCV_RULE_5,  0); tw32(MAC_RCV_VALUE_5,  0);
2551
+		/* Fall through */
2541 2552
 	case 5:
2542 2553
 		tw32(MAC_RCV_RULE_4,  0); tw32(MAC_RCV_VALUE_4,  0);
2554
+		/* Fall through */
2543 2555
 	case 4:
2544 2556
 		/* tw32(MAC_RCV_RULE_3,  0); tw32(MAC_RCV_VALUE_3,  0); */
2545 2557
 	case 3:

+ 3
- 2
src/tests/setjmp_test.c View File

@@ -111,8 +111,9 @@ static void setjmp_return_ok ( struct setjmp_test *test, int value ) {
111 111
  * @v file		Test code file
112 112
  * @v line		Test code line
113 113
  */
114
-static void longjmp_okx ( struct setjmp_test *test, int value,
115
-			  const char *file, unsigned int line ) {
114
+static void __attribute__ (( noreturn ))
115
+longjmp_okx ( struct setjmp_test *test, int value,
116
+	      const char *file, unsigned int line ) {
116 117
 
117 118
 	/* Record expected value.  A zero passed to longjmp() should
118 119
 	 * result in setjmp() returning a value of one.

Loading…
Cancel
Save