G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
_("Wanted to read %lu bytes but got EOF"),
- to_read);
+ (gulong)to_read);
goto fail;
}
g_app_info_reset_type_associations
#endif
#endif
-#endif
#if IN_HEADER(__G_DESKTOP_APP_INFO_H__)
{
GError *error;
CreateDeleteData *data;
+ int tmpfd;
data = g_new0 (CreateDeleteData, 1);
data->data = "abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNOPQRSTUVXYZ0123456789";
data->pos = 0;
- data->monitor_path = tempnam ("/tmp", "g_file_create_delete_");
+ /* Using tempnam() would be easier here, but causes a compile warning */
+ tmpfd = g_file_open_tmp ("g_file_create_delete_XXXXXX",
+ &data->monitor_path, NULL);
+ g_assert_cmpint (tmpfd, !=, -1);
+ close (tmpfd);
+ remove (data->monitor_path);
data->file = g_file_new_for_path (data->monitor_path);
g_assert (!g_file_query_exists (data->file, NULL));
{
ReplaceLoadData *data;
gchar *path;
+ int tmpfd;
data = g_new0 (ReplaceLoadData, 1);
data->again = TRUE;
" * make a backup of @file.\n"
" **/\n";
- path = tempnam ("/tmp", "g_file_replace_load_");
+ /* Using tempnam() would be easier here, but causes a compile warning */
+ tmpfd = g_file_open_tmp ("g_file_replace_load_XXXXXX",
+ &path, NULL);
+ g_assert_cmpint (tmpfd, !=, -1);
+ close (tmpfd);
+ remove (path);
+
data->file = g_file_new_for_path (path);
g_assert (!g_file_query_exists (data->file, NULL));
g_assert_cmpstr (names[0], ==, "first");
g_assert_cmpstr (names[1], ==, "testicon");
g_assert_cmpstr (names[2], ==, "last");
- g_assert_cmpuint (g_icon_hash (icon1), ==, 3193088045);
+ g_assert_cmpuint (g_icon_hash (icon1), ==, 3193088045U);
icon2 = g_themed_icon_new_from_names ((gchar**)names2, -1);
g_assert (g_icon_equal (icon1, icon2));
gint i;
/* Try to get all the leap year cases. */
- GDateYear check_years[] = {
+ int check_years[] = {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 98, 99, 100, 101, 102, 103, 397,
398, 399, 400, 401, 402, 403, 404, 405, 406,
l = GPOINTER_TO_INT (src);
u = g_ascii_toupper (l);
- return GINT_TO_POINTER (u);
+ return GINT_TO_POINTER ((int)u);
}
static void
};
static gboolean
-strv_equal (const gchar **a, const gchar **b)
+strv_equal (gchar **a, gchar **b)
{
gint i;
- if (g_strv_length ((gchar**)a) != g_strv_length ((gchar **)b))
+ if (g_strv_length (a) != g_strv_length (b))
return FALSE;
for (i = 0; a[i]; i++)
GObjectClass *object_class;
TestIfaceClass *iface_vtable;
GParamSpec **properties;
- gint n_properties;
+ guint n_properties;
gint val1, val2, val3, val4;