gtk.cfg: Fix/enhance Gtk library configuration (g_abort and others) (#2558)
test/CMakeLists.txt: Fix missing INCONCLUSIVE for Gtk configuration test
This commit is contained in:
parent
4e5a8fac4a
commit
f0e3f9e79a
22
cfg/gtk.cfg
22
cfg/gtk.cfg
|
@ -873,6 +873,10 @@
|
||||||
<function name="g_exit">
|
<function name="g_exit">
|
||||||
<noreturn>true</noreturn>
|
<noreturn>true</noreturn>
|
||||||
</function>
|
</function>
|
||||||
|
<!-- void g_abort (void) -->
|
||||||
|
<function name="g_abort">
|
||||||
|
<noreturn>true</noreturn>
|
||||||
|
</function>
|
||||||
<!-- gboolean g_hash_table_insert (GHashTable *hash_table, gpointer key, gpointer value); -->
|
<!-- gboolean g_hash_table_insert (GHashTable *hash_table, gpointer key, gpointer value); -->
|
||||||
<function name="g_hash_table_insert">
|
<function name="g_hash_table_insert">
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
|
@ -5862,9 +5866,16 @@
|
||||||
<leak-ignore/>
|
<leak-ignore/>
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
</function>
|
</function>
|
||||||
|
<!-- void g_option_context_add_group (GOptionContext *context, GOptionGroup *group); -->
|
||||||
<function name="g_option_context_add_group">
|
<function name="g_option_context_add_group">
|
||||||
<leak-ignore/>
|
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
|
<returnValue type="void"/>
|
||||||
|
<arg nr="1">
|
||||||
|
<not-uninit/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2">
|
||||||
|
<not-uninit/>
|
||||||
|
</arg>
|
||||||
</function>
|
</function>
|
||||||
<function name="g_option_context_add_main_entries">
|
<function name="g_option_context_add_main_entries">
|
||||||
<leak-ignore/>
|
<leak-ignore/>
|
||||||
|
@ -5906,9 +5917,16 @@
|
||||||
<leak-ignore/>
|
<leak-ignore/>
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
</function>
|
</function>
|
||||||
|
<!-- void g_option_context_set_main_group (GOptionContext *context, GOptionGroup *group); -->
|
||||||
<function name="g_option_context_set_main_group">
|
<function name="g_option_context_set_main_group">
|
||||||
<leak-ignore/>
|
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
|
<returnValue type="void"/>
|
||||||
|
<arg nr="1">
|
||||||
|
<not-uninit/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2">
|
||||||
|
<not-uninit/>
|
||||||
|
</arg>
|
||||||
</function>
|
</function>
|
||||||
<function name="g_option_context_set_summary">
|
<function name="g_option_context_set_summary">
|
||||||
<leak-ignore/>
|
<leak-ignore/>
|
||||||
|
|
|
@ -123,7 +123,7 @@ if (BUILD_TESTS)
|
||||||
add_cfg(bsd.c)
|
add_cfg(bsd.c)
|
||||||
add_cfg(gnu.c LIBRARY posix gnu)
|
add_cfg(gnu.c LIBRARY posix gnu)
|
||||||
add_cfg(googletest.cpp)
|
add_cfg(googletest.cpp)
|
||||||
add_cfg(gtk.c)
|
add_cfg(gtk.c INCONCLUSIVE)
|
||||||
add_cfg(libcurl.c)
|
add_cfg(libcurl.c)
|
||||||
add_cfg(lua.c)
|
add_cfg(lua.c)
|
||||||
add_cfg(openmp.c)
|
add_cfg(openmp.c)
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
@ -421,3 +422,10 @@ void g_strchug_g_strchomp_test(gchar * str1)
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
g_strchomp(str3);
|
g_strchomp(str3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void g_abort_test()
|
||||||
|
{
|
||||||
|
g_abort();
|
||||||
|
//cppcheck-suppress unreachableCode
|
||||||
|
printf("Never reached");
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue