Skip to content

Commit b9dd69f

Browse files
committed
gtk.cfg: Remove use-retval from g_file_set_contents definition
It is acceptable to write to a file without worrying about the result in general (allowed to fail).
1 parent 6a4fedd commit b9dd69f

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎cfg/gtk.cfg‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4063,7 +4063,6 @@
40634063
<leak-ignore/>
40644064
<noreturn>false</noreturn>
40654065
<returnValue type="gboolean"/>
4066-
<use-retval/>
40674066
<arg nr="1" direction="in">
40684067
<not-null/>
40694068
<not-uninit/>

‎test/cfg/gtk.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ void validCode(int argInt, GHashTableIter * hash_table_iter, GHashTable * hash_t
9494
// transfer none functions: return value should not be unreffed
9595
const GApplication *app = g_application_get_default();
9696
printf("%p\n", app);
97+
98+
// boolean return value can be ignored (use-retval should not be used)
99+
g_file_set_contents("file", "contents", -1, NULL);
97100
}
98101

99102
void g_malloc_test()

0 commit comments

Comments
 (0)