[gnome-commander] src/imageloader.cc: fix for -Wswitch-enum
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] src/imageloader.cc: fix for -Wswitch-enum
- Date: Fri, 28 Apr 2017 21:44:24 +0000 (UTC)
commit faa99302f433a9215d128f02c3a7989e46ad64f5
Author: Mamoru TASAKA <mtasaka fedoraproject org>
Date: Tue Apr 25 13:49:58 2017 +0900
src/imageloader.cc: fix for -Wswitch-enum
src/imageloader.cc:192:12: error: enumeration value 'GNOME_VFS_FILE_TYPE_UNKNOWN' not handled in switch
[-Werror=switch-enum]
src/imageloader.cc:426:12: error: enumeration value 'GNOME_CMD_LAYOUT_TEXT' not handled in switch
[-Werror=switch-enum]
src/imageloader.cc | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/imageloader.cc b/src/imageloader.cc
index a1eecfa..ed84460 100644
--- a/src/imageloader.cc
+++ b/src/imageloader.cc
@@ -189,6 +189,10 @@ static const gchar *get_type_icon_name (GnomeVFSFileType type)
"i-symlink.png"
};
+#if defined (__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wswitch-enum"
+#endif
switch (type)
{
case GNOME_VFS_FILE_TYPE_DIRECTORY:
@@ -209,6 +213,9 @@ static const gchar *get_type_icon_name (GnomeVFSFileType type)
default:
return names[1];
}
+#if defined (__GNUC__)
+#pragma GCC diagnostic pop
+#endif
return NULL;
}
@@ -423,6 +430,10 @@ gboolean IMAGE_get_pixmap_and_mask (GnomeVFSFileType type,
GdkPixmap **pixmap,
GdkBitmap **mask)
{
+#if defined (__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wswitch-enum"
+#endif
switch (gnome_cmd_data.options.layout)
{
case GNOME_CMD_LAYOUT_TYPE_ICONS:
@@ -436,6 +447,9 @@ gboolean IMAGE_get_pixmap_and_mask (GnomeVFSFileType type,
default:
return FALSE;
}
+#if defined (__GNUC__)
+#pragma GCC diagnostic pop
+#endif
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]