mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-26 12:12:10 +01:00
Merge branch 'ebassi/gcc-12-fixes' into 'main'
Fix array-bounds compiler warnings with GCC 12 See merge request GNOME/glib!2873
This commit is contained in:
commit
bafd025811
@ -710,7 +710,7 @@ merge_directory_results (void)
|
|||||||
static_total_results = g_renew (struct search_result, static_total_results, static_total_results_allocated);
|
static_total_results = g_renew (struct search_result, static_total_results, static_total_results_allocated);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (static_total_results + static_total_results_size != 0)
|
if (static_search_results_size != 0)
|
||||||
memcpy (static_total_results + static_total_results_size,
|
memcpy (static_total_results + static_total_results_size,
|
||||||
static_search_results,
|
static_search_results,
|
||||||
static_search_results_size * sizeof (struct search_result));
|
static_search_results_size * sizeof (struct search_result));
|
||||||
|
@ -124,8 +124,7 @@ test_object_set_property (GObject *gobject,
|
|||||||
TestObject *tobj = (TestObject *) gobject;
|
TestObject *tobj = (TestObject *) gobject;
|
||||||
|
|
||||||
g_assert_cmpint (prop_id, !=, 0);
|
g_assert_cmpint (prop_id, !=, 0);
|
||||||
g_assert_cmpint (prop_id, !=, N_PROPERTIES);
|
g_assert_true (prop_id < N_PROPERTIES && pspec == properties[prop_id]);
|
||||||
g_assert (pspec == properties[prop_id]);
|
|
||||||
|
|
||||||
switch ((TestObjectProperty)prop_id)
|
switch ((TestObjectProperty)prop_id)
|
||||||
{
|
{
|
||||||
@ -159,8 +158,7 @@ test_object_get_property (GObject *gobject,
|
|||||||
TestObject *tobj = (TestObject *) gobject;
|
TestObject *tobj = (TestObject *) gobject;
|
||||||
|
|
||||||
g_assert_cmpint (prop_id, !=, 0);
|
g_assert_cmpint (prop_id, !=, 0);
|
||||||
g_assert_cmpint (prop_id, !=, N_PROPERTIES);
|
g_assert_true (prop_id < N_PROPERTIES && pspec == properties[prop_id]);
|
||||||
g_assert (pspec == properties[prop_id]);
|
|
||||||
|
|
||||||
switch ((TestObjectProperty)prop_id)
|
switch ((TestObjectProperty)prop_id)
|
||||||
{
|
{
|
||||||
|
@ -132,8 +132,7 @@ test_object_set_property (GObject *gobject,
|
|||||||
TestObject *tobj = (TestObject *) gobject;
|
TestObject *tobj = (TestObject *) gobject;
|
||||||
|
|
||||||
g_assert_cmpint (prop_id, !=, 0);
|
g_assert_cmpint (prop_id, !=, 0);
|
||||||
g_assert_cmpint (prop_id, !=, N_PROPERTIES);
|
g_assert_true (prop_id < N_PROPERTIES && pspec == properties[prop_id]);
|
||||||
g_assert (pspec == properties[prop_id]);
|
|
||||||
|
|
||||||
switch ((TestObjectProperty)prop_id)
|
switch ((TestObjectProperty)prop_id)
|
||||||
{
|
{
|
||||||
@ -167,8 +166,7 @@ test_object_get_property (GObject *gobject,
|
|||||||
TestObject *tobj = (TestObject *) gobject;
|
TestObject *tobj = (TestObject *) gobject;
|
||||||
|
|
||||||
g_assert_cmpint (prop_id, !=, 0);
|
g_assert_cmpint (prop_id, !=, 0);
|
||||||
g_assert_cmpint (prop_id, !=, N_PROPERTIES);
|
g_assert_true (prop_id < N_PROPERTIES && pspec == properties[prop_id]);
|
||||||
g_assert (pspec == properties[prop_id]);
|
|
||||||
|
|
||||||
switch ((TestObjectProperty)prop_id)
|
switch ((TestObjectProperty)prop_id)
|
||||||
{
|
{
|
||||||
|
@ -104,8 +104,7 @@ test_object_set_property (GObject *gobject,
|
|||||||
TestObject *tobj = (TestObject *) gobject;
|
TestObject *tobj = (TestObject *) gobject;
|
||||||
|
|
||||||
g_assert_cmpint (prop_id, !=, 0);
|
g_assert_cmpint (prop_id, !=, 0);
|
||||||
g_assert_cmpint (prop_id, !=, N_PROPERTIES);
|
g_assert_true (prop_id < N_PROPERTIES && pspec == properties[prop_id]);
|
||||||
g_assert (pspec == properties[prop_id]);
|
|
||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
@ -139,8 +138,7 @@ test_object_get_property (GObject *gobject,
|
|||||||
TestObject *tobj = (TestObject *) gobject;
|
TestObject *tobj = (TestObject *) gobject;
|
||||||
|
|
||||||
g_assert_cmpint (prop_id, !=, 0);
|
g_assert_cmpint (prop_id, !=, 0);
|
||||||
g_assert_cmpint (prop_id, !=, N_PROPERTIES);
|
g_assert_true (prop_id < N_PROPERTIES && pspec == properties[prop_id]);
|
||||||
g_assert (pspec == properties[prop_id]);
|
|
||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user