From 130d29b641cfeb96c9cb0e77bf58fbfe0c38c796 Mon Sep 17 00:00:00 2001 From: Chris Peterson Date: Mon, 19 Oct 2015 19:59:31 -0700 Subject: [PATCH] Bug 1218258 - Fix -Wimplicit-fallthrough warnings in toolkit/components/downloads. r=paolo toolkit/components/downloads/nsDownloadManager.cpp:498:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels toolkit/components/downloads/nsDownloadManager.cpp:512:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels toolkit/components/downloads/nsDownloadManager.cpp:526:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels toolkit/components/downloads/nsDownloadManager.cpp:540:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels toolkit/components/downloads/nsDownloadManager.cpp:559:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels toolkit/components/downloads/nsDownloadManager.cpp:583:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels toolkit/components/downloads/nsDownloadManager.cpp:602:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels toolkit/components/downloads/nsDownloadManager.cpp:630:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels toolkit/components/downloads/nsDownloadManager.cpp:653:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels --- toolkit/components/downloads/nsDownloadManager.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp index 605eaea99c44..fab0d7963a5d 100644 --- a/toolkit/components/downloads/nsDownloadManager.cpp +++ b/toolkit/components/downloads/nsDownloadManager.cpp @@ -494,6 +494,7 @@ nsDownloadManager::InitFileDB() NS_ENSURE_SUCCESS(rv, rv); } // Fallthrough to the next upgrade + MOZ_FALLTHROUGH; case 2: // Add referrer column to the database { @@ -508,6 +509,7 @@ nsDownloadManager::InitFileDB() NS_ENSURE_SUCCESS(rv, rv); } // Fallthrough to the next upgrade + MOZ_FALLTHROUGH; case 3: // This version adds a column to the database (entityID) { @@ -522,6 +524,7 @@ nsDownloadManager::InitFileDB() NS_ENSURE_SUCCESS(rv, rv); } // Fallthrough to the next upgrade + MOZ_FALLTHROUGH; case 4: // This version adds a column to the database (tempPath) { @@ -536,6 +539,7 @@ nsDownloadManager::InitFileDB() NS_ENSURE_SUCCESS(rv, rv); } // Fallthrough to the next upgrade + MOZ_FALLTHROUGH; case 5: // This version adds two columns for tracking transfer progress { @@ -555,6 +559,7 @@ nsDownloadManager::InitFileDB() NS_ENSURE_SUCCESS(rv, rv); } // Fallthrough to the next upgrade + MOZ_FALLTHROUGH; case 6: // This version adds three columns to DB (MIME type related info) { @@ -579,6 +584,7 @@ nsDownloadManager::InitFileDB() NS_ENSURE_SUCCESS(rv, rv); } // Fallthrough to next upgrade + MOZ_FALLTHROUGH; case 7: // This version adds a column to remember to auto-resume downloads { @@ -593,6 +599,7 @@ nsDownloadManager::InitFileDB() NS_ENSURE_SUCCESS(rv, rv); } // Fallthrough to the next upgrade + MOZ_FALLTHROUGH; // Warning: schema versions >=8 must take into account that they can // be operating on schemas from unknown, future versions that have @@ -627,6 +634,7 @@ nsDownloadManager::InitFileDB() // Extra sanity checking for developers #ifndef DEBUG + MOZ_FALLTHROUGH; case DM_SCHEMA_VERSION: #endif break; @@ -643,6 +651,7 @@ nsDownloadManager::InitFileDB() NS_ENSURE_SUCCESS(rv, rv); } // Fallthrough to downgrade check + MOZ_FALLTHROUGH; // Downgrading // If columns have been added to the table, we can still use the ones we @@ -1804,7 +1813,6 @@ nsDownloadManager::RetryDownload(const nsACString& aGUID) return RetryDownload(dl); } - NS_IMETHODIMP nsDownloadManager::RetryDownload(uint32_t aID) {