[gnome-usage] Add missing default cases to switches
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-usage] Add missing default cases to switches
- Date: Fri, 3 Dec 2021 11:39:16 +0000 (UTC)
commit 12406d2a5a708315b3a255793c8ccc05f8854907
Author: Adrien Plazas <kekun plazas laposte net>
Date: Fri Dec 3 11:49:20 2021 +0100
Add missing default cases to switches
This avoids compilation warnings.
src/storage/storage-row-popover.vala | 2 ++
src/storage/storage-view-item.vala | 12 ++++++++++++
2 files changed, 14 insertions(+)
---
diff --git a/src/storage/storage-row-popover.vala b/src/storage/storage-row-popover.vala
index 57c9c51..2f45b31 100644
--- a/src/storage/storage-row-popover.vala
+++ b/src/storage/storage-row-popover.vala
@@ -31,6 +31,8 @@ public class Usage.StorageRowPopover : Gtk.Popover {
case StorageViewType.OS:
label.label = _("Operating system files are an essential part of your system and cannot be
removed.");
break;
+ default:
+ break;
}
popup();
diff --git a/src/storage/storage-view-item.vala b/src/storage/storage-view-item.vala
index 7b52d1f..81398bd 100644
--- a/src/storage/storage-view-item.vala
+++ b/src/storage/storage-view-item.vala
@@ -101,6 +101,8 @@ public class Usage.StorageViewItem : GLib.Object {
case UserDirectory.DOWNLOAD:
style_class = "downloads";
break;
+ default:
+ break;
}
}
@@ -120,6 +122,8 @@ public class Usage.StorageViewItem : GLib.Object {
case "nfo#EBook":
style_class = "documents";
break;
+ default:
+ break;
}
if (custom_type != StorageViewType.NONE) {
@@ -130,6 +134,8 @@ public class Usage.StorageViewItem : GLib.Object {
case StorageViewType.AVAILABLE_GRAPH:
style_class = "available-tag";
break;
+ default:
+ break;
}
}
@@ -144,6 +150,8 @@ public class Usage.StorageViewItem : GLib.Object {
case StorageViewType.AVAILABLE_GRAPH:
case StorageViewType.UP_FOLDER:
return false;
+ default:
+ break;
}
}
@@ -155,6 +163,8 @@ public class Usage.StorageViewItem : GLib.Object {
case UserDirectory.MUSIC:
case UserDirectory.DOWNLOAD:
return true;
+ default:
+ break;
}
}
@@ -167,6 +177,8 @@ public class Usage.StorageViewItem : GLib.Object {
case "nfo#FileDataObject":
case "nfo#EBook":
return true;
+ default:
+ break;
}
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]