mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-26 04:02:09 +01:00
glib: Fix enumeration warnings from gcc 4.5
Just introduce more values for our private enum for the cases that were missing.
This commit is contained in:
parent
67740263e9
commit
889889a296
@ -454,7 +454,10 @@ g_io_channel_new_file (const gchar *filename,
|
|||||||
MODE_R = 1 << 0,
|
MODE_R = 1 << 0,
|
||||||
MODE_W = 1 << 1,
|
MODE_W = 1 << 1,
|
||||||
MODE_A = 1 << 2,
|
MODE_A = 1 << 2,
|
||||||
MODE_PLUS = 1 << 3
|
MODE_PLUS = 1 << 3,
|
||||||
|
MODE_R_PLUS = MODE_R | MODE_PLUS,
|
||||||
|
MODE_W_PLUS = MODE_W | MODE_PLUS,
|
||||||
|
MODE_A_PLUS = MODE_A | MODE_PLUS
|
||||||
} mode_num;
|
} mode_num;
|
||||||
struct stat buffer;
|
struct stat buffer;
|
||||||
|
|
||||||
@ -505,15 +508,16 @@ g_io_channel_new_file (const gchar *filename,
|
|||||||
case MODE_A:
|
case MODE_A:
|
||||||
flags = O_WRONLY | O_APPEND | O_CREAT;
|
flags = O_WRONLY | O_APPEND | O_CREAT;
|
||||||
break;
|
break;
|
||||||
case MODE_R | MODE_PLUS:
|
case MODE_R_PLUS:
|
||||||
flags = O_RDWR;
|
flags = O_RDWR;
|
||||||
break;
|
break;
|
||||||
case MODE_W | MODE_PLUS:
|
case MODE_W_PLUS:
|
||||||
flags = O_RDWR | O_TRUNC | O_CREAT;
|
flags = O_RDWR | O_TRUNC | O_CREAT;
|
||||||
break;
|
break;
|
||||||
case MODE_A | MODE_PLUS:
|
case MODE_A_PLUS:
|
||||||
flags = O_RDWR | O_APPEND | O_CREAT;
|
flags = O_RDWR | O_APPEND | O_CREAT;
|
||||||
break;
|
break;
|
||||||
|
case MODE_PLUS:
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
flags = 0;
|
flags = 0;
|
||||||
@ -556,12 +560,13 @@ g_io_channel_new_file (const gchar *filename,
|
|||||||
channel->is_readable = FALSE;
|
channel->is_readable = FALSE;
|
||||||
channel->is_writeable = TRUE;
|
channel->is_writeable = TRUE;
|
||||||
break;
|
break;
|
||||||
case MODE_R | MODE_PLUS:
|
case MODE_R_PLUS:
|
||||||
case MODE_W | MODE_PLUS:
|
case MODE_W_PLUS:
|
||||||
case MODE_A | MODE_PLUS:
|
case MODE_A_PLUS:
|
||||||
channel->is_readable = TRUE;
|
channel->is_readable = TRUE;
|
||||||
channel->is_writeable = TRUE;
|
channel->is_writeable = TRUE;
|
||||||
break;
|
break;
|
||||||
|
case MODE_PLUS:
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user