Fix a gcc warning seen in Chromium OS build.
Please note that gcc's warn_unused_result check is enforced on the build environment. Anyway, I believe it's good to check the return value in this case. BUG=none TEST=ran emerge-x86-generic ibus. Review URL: http://codereview.appspot.com/3904044
This commit is contained in:
Родитель
199f80396f
Коммит
ca4909cc83
|
@ -336,6 +336,7 @@ bus_registry_save_cache (BusRegistry *registry)
|
|||
GString *output;
|
||||
GList *p;
|
||||
FILE *pf;
|
||||
size_t items = 0;
|
||||
|
||||
cachedir = g_build_filename (g_get_user_cache_dir (), "ibus", "bus", NULL);
|
||||
filename = g_build_filename (cachedir, "registry.xml", NULL);
|
||||
|
@ -379,10 +380,10 @@ bus_registry_save_cache (BusRegistry *registry)
|
|||
}
|
||||
|
||||
g_string_append (output, "</ibus-registry>\n");
|
||||
fwrite (output->str, output->len, 1, pf);
|
||||
items = fwrite (output->str, output->len, 1, pf);
|
||||
g_string_free (output, TRUE);
|
||||
fclose (pf);
|
||||
return TRUE;
|
||||
return (items == 1 ? TRUE : FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче