Merge "nfc: enable -Wimplicit-fallthrough"
am: 480c070a77

Change-Id: I39ea140694eb7ba5ba9dd62dd79bb12a788986f6
diff --git a/src/Android.bp b/src/Android.bp
index 0db231d..2bc753e 100644
--- a/src/Android.bp
+++ b/src/Android.bp
@@ -31,6 +31,7 @@
         "-DBUILDCFG=1",
         "-Wall",
         "-Werror",
+        "-Wimplicit-fallthrough",
     ],
     local_include_dirs: [
         "include",
diff --git a/src/nfc/tags/rw_t1t.cc b/src/nfc/tags/rw_t1t.cc
index 5e53e7a..c4e5e31 100644
--- a/src/nfc/tags/rw_t1t.cc
+++ b/src/nfc/tags/rw_t1t.cc
@@ -268,7 +268,8 @@
           p_data->data.p_data = nullptr;
         }
       }
-    /* Data event with error status...fall through to NFC_ERROR_CEVT case */
+      /* Data event with error status...fall through to NFC_ERROR_CEVT case */
+      FALLTHROUGH_INTENDED;
 
     case NFC_ERROR_CEVT:
       if ((p_t1t->state == RW_T1T_STATE_NOT_ACTIVATED) ||
diff --git a/src/nfc/tags/rw_t2t.cc b/src/nfc/tags/rw_t2t.cc
index 41aab03..2f3841e 100644
--- a/src/nfc/tags/rw_t2t.cc
+++ b/src/nfc/tags/rw_t2t.cc
@@ -289,7 +289,8 @@
           p_data->data.p_data = nullptr;
         }
       }
-    /* Data event with error status...fall through to NFC_ERROR_CEVT case */
+      /* Data event with error status...fall through to NFC_ERROR_CEVT case */
+      FALLTHROUGH_INTENDED;
 
     case NFC_ERROR_CEVT:
       if ((p_t2t->state == RW_T2T_STATE_NOT_ACTIVATED) ||
diff --git a/src/nfc/tags/rw_t2t_ndef.cc b/src/nfc/tags/rw_t2t_ndef.cc
index d3bc883..a0ddd32 100644
--- a/src/nfc/tags/rw_t2t_ndef.cc
+++ b/src/nfc/tags/rw_t2t_ndef.cc
@@ -1727,10 +1727,10 @@
         b_notify = true;
         break;
       }
+      FALLTHROUGH_INTENDED;
 
     /* Coverity: [FALSE-POSITIVE error] intended fall through */
     /* Missing break statement between cases in switch statement */
-    /* fall through */
     case RW_T2T_SUBSTATE_WAIT_SET_DYN_LOCK_BITS:
 
       num_locks = 0;
@@ -1873,8 +1873,8 @@
         } else
           break;
       }
+      FALLTHROUGH_INTENDED;
 
-    /* falls through */
     case RW_T2T_SUBSTATE_WAIT_SET_LOCK_TLV:
 
       /* Prepare NULL NDEF TLV, TERMINATOR_TLV */
diff --git a/src/nfc/tags/rw_t3t.cc b/src/nfc/tags/rw_t3t.cc
index 54e79f1..075c2d7 100644
--- a/src/nfc/tags/rw_t3t.cc
+++ b/src/nfc/tags/rw_t3t.cc
@@ -2234,7 +2234,8 @@
         GKI_freebuf((NFC_HDR*)(p_data->data.p_data));
         p_data->data.p_data = nullptr;
       }
-    /* Data event with error status...fall through to NFC_ERROR_CEVT case */
+      /* Data event with error status...fall through to NFC_ERROR_CEVT case */
+      FALLTHROUGH_INTENDED;
 
     case NFC_ERROR_CEVT:
       nfc_stop_quick_timer(&p_cb->timer);