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
 		case 'G':
282
 		case 'G':
283
 		case 'g':
283
 		case 'g':
284
 			bzimg->mem_limit <<= 10;
284
 			bzimg->mem_limit <<= 10;
285
+			/* Fall through */
285
 		case 'M':
286
 		case 'M':
286
 		case 'm':
287
 		case 'm':
287
 			bzimg->mem_limit <<= 10;
288
 			bzimg->mem_limit <<= 10;
289
+			/* Fall through */
288
 		case 'K':
290
 		case 'K':
289
 		case 'k':
291
 		case 'k':
290
 			bzimg->mem_limit <<= 10;
292
 			bzimg->mem_limit <<= 10;

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

1956
 	case GOLAN_PORT_CHANGE_SUBTYPE_CLIENT_REREG:
1956
 	case GOLAN_PORT_CHANGE_SUBTYPE_CLIENT_REREG:
1957
 	case GOLAN_PORT_CHANGE_SUBTYPE_ACTIVE:
1957
 	case GOLAN_PORT_CHANGE_SUBTYPE_ACTIVE:
1958
 		golan_ib_update ( ibdev );
1958
 		golan_ib_update ( ibdev );
1959
+		/* Fall through */
1959
 	case GOLAN_PORT_CHANGE_SUBTYPE_DOWN:
1960
 	case GOLAN_PORT_CHANGE_SUBTYPE_DOWN:
1960
 	case GOLAN_PORT_CHANGE_SUBTYPE_LID:
1961
 	case GOLAN_PORT_CHANGE_SUBTYPE_LID:
1961
 	case GOLAN_PORT_CHANGE_SUBTYPE_PKEY:
1962
 	case GOLAN_PORT_CHANGE_SUBTYPE_PKEY:

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

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

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

122
 				aModeRefSel = 2;
122
 				aModeRefSel = 2;
123
 			if (aModeRefSel)
123
 			if (aModeRefSel)
124
 				break;
124
 				break;
125
+			/* Fall through */
125
 		case 1:
126
 		case 1:
126
 		default:
127
 		default:
127
 			aModeRefSel = 0;
128
 			aModeRefSel = 0;

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

539
 	case 0x5:
539
 	case 0x5:
540
 		REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP,
540
 		REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP,
541
 			    AR_PHY_SWAP_ALT_CHAIN);
541
 			    AR_PHY_SWAP_ALT_CHAIN);
542
+		/* Fall through */
542
 	case 0x3:
543
 	case 0x3:
543
 	case 0x1:
544
 	case 0x1:
544
 	case 0x2:
545
 	case 0x2:

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

357
 		break;
357
 		break;
358
 	case e1000_promisc_enabled:
358
 	case e1000_promisc_enabled:
359
 		msgbuf |= E1000_VF_SET_PROMISC_MULTICAST;
359
 		msgbuf |= E1000_VF_SET_PROMISC_MULTICAST;
360
+		/* Fall through */
360
 	case e1000_promisc_unicast:
361
 	case e1000_promisc_unicast:
361
 		msgbuf |= E1000_VF_SET_PROMISC_UNICAST;
362
 		msgbuf |= E1000_VF_SET_PROMISC_UNICAST;
362
 	case e1000_promisc_disabled:
363
 	case e1000_promisc_disabled:

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

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

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

111
  * @v file		Test code file
111
  * @v file		Test code file
112
  * @v line		Test code line
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
 	/* Record expected value.  A zero passed to longjmp() should
118
 	/* Record expected value.  A zero passed to longjmp() should
118
 	 * result in setjmp() returning a value of one.
119
 	 * result in setjmp() returning a value of one.

Loading…
Cancel
Save