Merge branch '1767-scan-build-fixes' into 'master'

Various small scan-build fixes

See merge request GNOME/glib!1088
This commit is contained in:
Nirbheek Chauhan
2019-09-13 12:37:37 +00:00
19 changed files with 44 additions and 18 deletions

View File

@@ -346,8 +346,7 @@ g_boxed_copy (GType boxed_type,
g_return_val_if_fail (src_boxed != NULL, NULL);
value_table = g_type_value_table_peek (boxed_type);
if (!value_table)
g_return_val_if_fail (G_TYPE_IS_VALUE_TYPE (boxed_type), NULL);
g_assert (value_table != NULL);
/* check if our proxying implementation is used, we can short-cut here */
if (value_table->value_copy == boxed_proxy_value_copy)
@@ -404,8 +403,7 @@ g_boxed_free (GType boxed_type,
g_return_if_fail (boxed != NULL);
value_table = g_type_value_table_peek (boxed_type);
if (!value_table)
g_return_if_fail (G_TYPE_IS_VALUE_TYPE (boxed_type));
g_assert (value_table != NULL);
/* check if our proxying implementation is used, we can short-cut here */
if (value_table->value_free == boxed_proxy_value_free)

View File

@@ -25,7 +25,9 @@
#error "config.h must be included prior to gobject_trace.h"
#endif
#ifdef HAVE_DTRACE
/* Ignore probes when doing static analysis, as they do weird things which
* confuses the analyser. */
#if defined(HAVE_DTRACE) && !defined(__clang_analyzer__)
/* include the generated probes header and put markers in code */
#include "gobject_probes.h"

View File

@@ -113,6 +113,9 @@ test_autolist (void)
l = g_list_prepend (l, tac1);
l = g_list_prepend (l, tac2);
/* Squash warnings about dead stores */
(void) l;
}
/* Only assert if autoptr works */