Warnings when compiled with -fanalyzer
GCC 10 added a static analyzer. In order to activate it by default in the CI we need to fix or silence them first:
In function ‘_cogl_bind_gl_texture_transient’:
../cogl/cogl/driver/gl/cogl-pipeline-opengl.c:179:11: warning: dereference of NULL ‘unit’ [CWE-690] [-Wanalyzer-null-dereference]
179 | if (unit->gl_texture == gl_texture && !unit->dirty_gl_texture)
| ~~~~^~~~~~~~~~~~
‘_cogl_bind_gl_texture_transient’: event 1
|
| 162 | _cogl_bind_gl_texture_transient (GLenum gl_target,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘_cogl_bind_gl_texture_transient’
|
‘_cogl_bind_gl_texture_transient’: event 2
|
|../cogl/cogl/cogl-context-private.h:306:4:
| 306 | if (ctxvar == NULL) return retval;
| | ^
| | |
| | (2) following ‘false’ branch (when ‘ctx’ is non-NULL)...
../cogl/cogl/driver/gl/cogl-pipeline-opengl.c:167:3: note: in expansion of macro ‘_COGL_GET_CONTEXT’
| 167 | _COGL_GET_CONTEXT (ctx, NO_RETVAL);
| | ^~~~~~~~~~~~~~~~~
|
‘_cogl_bind_gl_texture_transient’: events 3-4
|
| 176 | _cogl_set_active_texture_unit (1);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (3) ...to here
| 177 | unit = _cogl_get_texture_unit (1);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (4) calling ‘_cogl_get_texture_unit’ from ‘_cogl_bind_gl_texture_transient’
|
+--> ‘_cogl_get_texture_unit’: event 5
|
| 94 | _cogl_get_texture_unit (int index_)
| | ^~~~~~~~~~~~~~~~~~~~~~
| | |
| | (5) entry to ‘_cogl_get_texture_unit’
|
‘_cogl_get_texture_unit’: event 6
|
|../cogl/cogl/cogl-context-private.h:306:4:
| 306 | if (ctxvar == NULL) return retval;
| | ^
| | |
| | (6) following ‘true’ branch (when ‘ctx’ is NULL)...
../cogl/cogl/driver/gl/cogl-pipeline-opengl.c:96:3: note: in expansion of macro ‘_COGL_GET_CONTEXT’
| 96 | _COGL_GET_CONTEXT (ctx, NULL);
| | ^~~~~~~~~~~~~~~~~
|
‘_cogl_get_texture_unit’: event 7
|
| 96 | _COGL_GET_CONTEXT (ctx, NULL);
| | ^~~~
| | |
| | (7) ...to here
../cogl/cogl/cogl-context-private.h:306:28: note: in definition of macro ‘_COGL_GET_CONTEXT’
| 306 | if (ctxvar == NULL) return retval;
| | ^~~~~~
|
‘_cogl_get_texture_unit’: event 8
|
|cc1:
| (8): ‘<return-value>’ is NULL
|
<------+
|
‘_cogl_bind_gl_texture_transient’: events 9-10
|
|../cogl/cogl/driver/gl/cogl-pipeline-opengl.c:177:10:
| 177 | unit = _cogl_get_texture_unit (1);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (9) return of NULL to ‘_cogl_bind_gl_texture_transient’ from ‘_cogl_get_texture_unit’
| 178 |
| 179 | if (unit->gl_texture == gl_texture && !unit->dirty_gl_texture)
| | ~~~~~~~~~~~~~~~~
| | |
| | (10) dereference of NULL ‘unit’
|
In function ‘_cogl_pipeline_flush_gl_state’:
../cogl/cogl/driver/gl/cogl-pipeline-opengl.c:1134:57: warning: dereference of NULL ‘unit1’ [CWE-690] [-Wanalyzer-null-dereference]
1134 | if (cogl_pipeline_get_n_layers (pipeline) > 1 && unit1->dirty_gl_texture)
| ~~~~~^~~~~~~~~~~~~~~~~~
‘_cogl_pipeline_flush_gl_state’: events 1-2
|
| 882 | _cogl_pipeline_flush_gl_state (CoglContext *ctx,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘_cogl_pipeline_flush_gl_state’
|......
| 1133 | unit1 = _cogl_get_texture_unit (1);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (2) calling ‘_cogl_get_texture_unit’ from ‘_cogl_pipeline_flush_gl_state’
|
+--> ‘_cogl_get_texture_unit’: event 3
|
| 94 | _cogl_get_texture_unit (int index_)
| | ^~~~~~~~~~~~~~~~~~~~~~
| | |
| | (3) entry to ‘_cogl_get_texture_unit’
|
‘_cogl_get_texture_unit’: event 4
|
|../cogl/cogl/cogl-context-private.h:306:4:
| 306 | if (ctxvar == NULL) return retval;
| | ^
| | |
| | (4) following ‘true’ branch (when ‘ctx’ is NULL)...
../cogl/cogl/driver/gl/cogl-pipeline-opengl.c:96:3: note: in expansion of macro ‘_COGL_GET_CONTEXT’
| 96 | _COGL_GET_CONTEXT (ctx, NULL);
| | ^~~~~~~~~~~~~~~~~
|
‘_cogl_get_texture_unit’: event 5
|
| 96 | _COGL_GET_CONTEXT (ctx, NULL);
| | ^~~~
| | |
| | (5) ...to here
../cogl/cogl/cogl-context-private.h:306:28: note: in definition of macro ‘_COGL_GET_CONTEXT’
| 306 | if (ctxvar == NULL) return retval;
| | ^~~~~~
|
‘_cogl_get_texture_unit’: event 6
|
|cc1:
| (6): ‘<return-value>’ is NULL
|
<------+
|
‘_cogl_pipeline_flush_gl_state’: events 7-10
|
|../cogl/cogl/driver/gl/cogl-pipeline-opengl.c:1133:11:
| 1133 | unit1 = _cogl_get_texture_unit (1);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (7) return of NULL to ‘_cogl_pipeline_flush_gl_state’ from ‘_cogl_get_texture_unit’
| 1134 | if (cogl_pipeline_get_n_layers (pipeline) > 1 && unit1->dirty_gl_texture)
| | ~ ~~~~~~~~~~~~~~~~~~~~~~~
| | | |
| | | (9) ...to here
| | | (10) dereference of NULL ‘unit1’
| | (8) following ‘true’ branch...
|
../cogl/cogl/cogl-pipeline-state.c: In function ‘_cogl_pipeline_compare_uniform_differences’:
../cogl/cogl/cogl-pipeline-state.c:1540:9: warning: dereference of NULL ‘head1’ [CWE-690] [-Wanalyzer-null-dereference]
1540 | head1 = head1->next;
| ~~~~~~^~~~~~~~~~~~~
‘_cogl_pipeline_compare_uniform_differences’: events 1-2
|
| 1505 | GSList *head1 = NULL;
| | ^~~~~
| | |
| | (1) ‘head1’ is NULL
|......
| 1518 | for (node0 = pipeline0; node0; node0 = _cogl_pipeline_get_parent (node0))
| | ~~~
| | |
| | (2) following ‘true’ branch (when ‘node0’ is non-NULL)...
|
‘_cogl_pipeline_compare_uniform_differences’: event 3
|
| 1520 | GSList *link = alloca (sizeof (GSList));
| | ^~~~~~
| | |
| | (3) ...to here
|
‘_cogl_pipeline_compare_uniform_differences’: event 4
|
| 1518 | for (node0 = pipeline0; node0; node0 = _cogl_pipeline_get_parent (node0))
| | ^~~
| | |
| | (4) following ‘true’ branch (when ‘node0’ is non-NULL)...
|
‘_cogl_pipeline_compare_uniform_differences’: event 5
|
| 1520 | GSList *link = alloca (sizeof (GSList));
| | ^~~~~~
| | |
| | (5) ...to here
|
‘_cogl_pipeline_compare_uniform_differences’: events 6-10
|
| 1518 | for (node0 = pipeline0; node0; node0 = _cogl_pipeline_get_parent (node0))
| | ^~~
| | |
| | (6) following ‘false’ branch (when ‘node0’ is NULL)...
|......
| 1526 | for (node1 = pipeline1; node1; node1 = _cogl_pipeline_get_parent (node1))
| | ~~~ ~~~~~~~~~~~~~~~~~
| | | |
| | | (7) ...to here
| | (8) following ‘false’ branch (when ‘node1’ is NULL)...
|......
| 1537 | common_ancestor0 = head0;
| | ~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (9) ...to here
|......
| 1540 | head1 = head1->next;
| | ~~~~~~~~~~~~~~~~~~~
| | |
| | (10) dereference of NULL ‘head1’
|
../cogl/cogl/cogl-matrix-stack.c: In function ‘cogl_matrix_entry_calculate_translation’:
../cogl/cogl/cogl-matrix-stack.c:732:31: warning: dereference of NULL ‘head1’ [CWE-690] [-Wanalyzer-null-dereference]
732 | if (head0->data != head1->data)
| ~~~~~^~~~~~
‘cogl_matrix_entry_calculate_translation’: events 1-5
|
| 689 | for (node0 = entry0; node0; node0 = node0->parent)
| | ^~~
| | |
| | (1) following ‘true’ branch (when ‘node0’ is non-NULL)...
|......
| 693 | if (node0->op == COGL_MATRIX_OP_SAVE)
| | ~~~~~~~~~
| | |
| | (2) ...to here
|......
| 705 | for (node1 = entry1; node1; node1 = node1->parent)
| | ~~~
| | |
| | (3) following ‘true’ branch (when ‘node1’ is non-NULL)...
|......
| 709 | if (node1->op == COGL_MATRIX_OP_SAVE)
| | ~~~~~~~~~~
| | | |
| | | (4) ...to here
| | (5) following ‘false’ branch...
|
‘cogl_matrix_entry_calculate_translation’: event 6
|
| 712 | link = alloca (sizeof (GSList));
| | ^~~~~~
| | |
| | (6) ...to here
|
‘cogl_matrix_entry_calculate_translation’: event 7
|
| 718 | if (node1->op != COGL_MATRIX_OP_TRANSLATE)
| | ^
| | |
| | (7) following ‘true’ branch...
|
‘cogl_matrix_entry_calculate_translation’: event 8
|
|cc1:
| (8): ...to here
|
‘cogl_matrix_entry_calculate_translation’: events 9-14
|
| 722 | if (head0->data != head1->data)
| | ^
| | |
| | (9) following ‘false’ branch...
|......
| 725 | common_ancestor0 = head0;
| | ~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (10) ...to here
| | (11) ‘head1’ is NULL
|......
| 730 | while (count--)
| | ~
| | |
| | (12) following ‘true’ branch...
| 731 | {
| 732 | if (head0->data != head1->data)
| | ~~~~~~~~~~~ ~~~~~~~~~~~
| | | |
| | | (14) dereference of NULL ‘head1’
| | (13) ...to here
|
../cogl/cogl/cogl-pipeline-layer.c: In function ‘_cogl_pipeline_layer_compare_differences’:
../cogl/cogl/cogl-pipeline-layer.c:559:9: warning: dereference of NULL ‘head0’ [CWE-690] [-Wanalyzer-null-dereference]
559 | head0 = head0->next;
| ~~~~~~^~~~~~~~~~~~~
‘_cogl_pipeline_layer_compare_differences’: events 1-6
|
| 514 | GSList *head0 = NULL;
| | ^~~~~
| | |
| | (1) ‘head0’ is NULL
|......
| 538 | for (node0 = layer0; node0; node0 = _cogl_pipeline_layer_get_parent (node0))
| | ~~~
| | |
| | (2) following ‘false’ branch (when ‘node0’ is NULL)...
|......
| 546 | for (node1 = layer1; node1; node1 = _cogl_pipeline_layer_get_parent (node1))
| | ~~~ ~~~~~~~~~~~~~~
| | | |
| | | (3) ...to here
| | (4) following ‘false’ branch (when ‘node1’ is NULL)...
|......
| 557 | common_ancestor0 = head0;
| | ~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (5) ...to here
| 558 | common_ancestor1 = head1;
| 559 | head0 = head0->next;
| | ~~~~~~~~~~~~~~~~~~~
| | |
| | (6) dereference of NULL ‘head0’
|
../cogl/cogl/cogl-pipeline-layer.c:560:9: warning: dereference of NULL ‘head1’ [CWE-690] [-Wanalyzer-null-dereference]
560 | head1 = head1->next;
| ~~~~~~^~~~~~~~~~~~~
‘_cogl_pipeline_layer_compare_differences’: events 1-2
|
| 515 | GSList *head1 = NULL;
| | ^~~~~
| | |
| | (1) ‘head1’ is NULL
|......
| 538 | for (node0 = layer0; node0; node0 = _cogl_pipeline_layer_get_parent (node0))
| | ~~~
| | |
| | (2) following ‘true’ branch (when ‘node0’ is non-NULL)...
|
‘_cogl_pipeline_layer_compare_differences’: event 3
|
| 540 | GSList *link = alloca (sizeof (GSList));
| | ^~~~~~
| | |
| | (3) ...to here
|
‘_cogl_pipeline_layer_compare_differences’: events 4-8
|
| 538 | for (node0 = layer0; node0; node0 = _cogl_pipeline_layer_get_parent (node0))
| | ^~~
| | |
| | (4) following ‘false’ branch (when ‘node0’ is NULL)...
|......
| 546 | for (node1 = layer1; node1; node1 = _cogl_pipeline_layer_get_parent (node1))
| | ~~~ ~~~~~~~~~~~~~~
| | | |
| | | (5) ...to here
| | (6) following ‘false’ branch (when ‘node1’ is NULL)...
|......
| 557 | common_ancestor0 = head0;
| | ~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (7) ...to here
|......
| 560 | head1 = head1->next;
| | ~~~~~~~~~~~~~~~~~~~
| | |
| | (8) dereference of NULL ‘head1’
|
../cogl/cogl/cogl-pipeline.c: In function ‘_cogl_pipeline_compare_differences’:
../cogl/cogl/cogl-pipeline.c:1924:9: warning: dereference of NULL ‘head0’ [CWE-690] [-Wanalyzer-null-dereference]
1924 | head0 = head0->next;
| ~~~~~~^~~~~~~~~~~~~
‘_cogl_pipeline_compare_differences’: events 1-6
|
| 1879 | GSList *head0 = NULL;
| | ^~~~~
| | |
| | (1) ‘head0’ is NULL
|......
| 1903 | for (node0 = pipeline0; node0; node0 = _cogl_pipeline_get_parent (node0))
| | ~~~
| | |
| | (2) following ‘false’ branch (when ‘node0’ is NULL)...
|......
| 1911 | for (node1 = pipeline1; node1; node1 = _cogl_pipeline_get_parent (node1))
| | ~~~ ~~~~~~~~~~~~~~~~~
| | | |
| | | (3) ...to here
| | (4) following ‘false’ branch (when ‘node1’ is NULL)...
|......
| 1922 | common_ancestor0 = head0;
| | ~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (5) ...to here
| 1923 | common_ancestor1 = head1;
| 1924 | head0 = head0->next;
| | ~~~~~~~~~~~~~~~~~~~
| | |
| | (6) dereference of NULL ‘head0’
|
../cogl/cogl/cogl-pipeline.c:1925:9: warning: dereference of NULL ‘head1’ [CWE-690] [-Wanalyzer-null-dereference]
1925 | head1 = head1->next;
| ~~~~~~^~~~~~~~~~~~~
‘_cogl_pipeline_compare_differences’: events 1-2
|
| 1880 | GSList *head1 = NULL;
| | ^~~~~
| | |
| | (1) ‘head1’ is NULL
|......
| 1903 | for (node0 = pipeline0; node0; node0 = _cogl_pipeline_get_parent (node0))
| | ~~~
| | |
| | (2) following ‘true’ branch (when ‘node0’ is non-NULL)...
|
‘_cogl_pipeline_compare_differences’: event 3
|
| 1905 | GSList *link = alloca (sizeof (GSList));
| | ^~~~~~
| | |
| | (3) ...to here
|
‘_cogl_pipeline_compare_differences’: events 4-8
|
| 1903 | for (node0 = pipeline0; node0; node0 = _cogl_pipeline_get_parent (node0))
| | ^~~
| | |
| | (4) following ‘false’ branch (when ‘node0’ is NULL)...
|......
| 1911 | for (node1 = pipeline1; node1; node1 = _cogl_pipeline_get_parent (node1))
| | ~~~ ~~~~~~~~~~~~~~~~~
| | | |
| | | (5) ...to here
| | (6) following ‘false’ branch (when ‘node1’ is NULL)...
|......
| 1922 | common_ancestor0 = head0;
| | ~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (7) ...to here
|......
| 1925 | head1 = head1->next;
| | ~~~~~~~~~~~~~~~~~~~
| | |
| | (8) dereference of NULL ‘head1’
|
In function ‘_cogl_bitmap_new_shared’:
../cogl/cogl/cogl-bitmap.c:265:19: warning: dereference of NULL ‘bmp’ [CWE-690] [-Wanalyzer-null-dereference]
265 | bmp->shared_bmp = cogl_object_ref (shared_bmp);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
‘_cogl_bitmap_new_shared’: events 1-2
|
| 251 | _cogl_bitmap_new_shared (CoglBitmap *shared_bmp,
| | ^~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘_cogl_bitmap_new_shared’
|......
| 259 | bmp = cogl_bitmap_new_for_data (shared_bmp->context,
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (2) calling ‘cogl_bitmap_new_for_data’ from ‘_cogl_bitmap_new_shared’
| 260 | width, height,
| | ~~~~~~~~~~~~~~
| 261 | format,
| | ~~~~~~~
| 262 | rowstride,
| | ~~~~~~~~~~
| 263 | NULL /* data */);
| | ~~~~~~~~~~~~~~~~
|
+--> ‘cogl_bitmap_new_for_data’: event 3
|
| 177 | cogl_bitmap_new_for_data (CoglContext *context,
| | ^~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (3) entry to ‘cogl_bitmap_new_for_data’
|
‘cogl_bitmap_new_for_data’: event 4
|
|/usr/include/glib-2.0/glib/gmessages.h:637:8:
| 637 | if (G_LIKELY (expr)) \
| | ^
| | |
| | (4) following ‘false’ branch...
../cogl/cogl/cogl-bitmap.c:186:3: note: in expansion of macro ‘g_return_val_if_fail’
| 186 | g_return_val_if_fail (cogl_is_context (context), NULL);
| | ^~~~~~~~~~~~~~~~~~~~
|
‘cogl_bitmap_new_for_data’: event 5
|
|/usr/include/glib-2.0/glib/gmessages.h:641:9:
| 641 | g_return_if_fail_warning (G_LOG_DOMAIN, \
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (5) ...to here
| 642 | G_STRFUNC, \
| | ~~~~~~~~~~~~
| 643 | #expr); \
| | ~~~~~~
../cogl/cogl/cogl-bitmap.c:186:3: note: in expansion of macro ‘g_return_val_if_fail’
| 186 | g_return_val_if_fail (cogl_is_context (context), NULL);
| | ^~~~~~~~~~~~~~~~~~~~
|
‘cogl_bitmap_new_for_data’: event 6
|
|cc1:
| (6): ‘<return-value>’ is NULL
|
<------+
|
‘_cogl_bitmap_new_shared’: events 7-8
|
| 259 | bmp = cogl_bitmap_new_for_data (shared_bmp->context,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (7) return of NULL to ‘_cogl_bitmap_new_shared’ from ‘cogl_bitmap_new_for_data’
| 260 | width, height,
| | ~~~~~~~~~~~~~~
| 261 | format,
| | ~~~~~~~
| 262 | rowstride,
| | ~~~~~~~~~~
| 263 | NULL /* data */);
| | ~~~~~~~~~~~~~~~~
| 264 |
| 265 | bmp->shared_bmp = cogl_object_ref (shared_bmp);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (8) dereference of NULL ‘bmp’
|
In function ‘cogl_bitmap_new_from_buffer’:
../cogl/cogl/cogl-bitmap.c:300:15: warning: dereference of NULL ‘bmp’ [CWE-690] [-Wanalyzer-null-dereference]
300 | bmp->buffer = cogl_object_ref (buffer);
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
‘cogl_bitmap_new_from_buffer’: event 1
|
| 283 | cogl_bitmap_new_from_buffer (CoglBuffer *buffer,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘cogl_bitmap_new_from_buffer’
|
‘cogl_bitmap_new_from_buffer’: event 2
|
|/usr/include/glib-2.0/glib/gmessages.h:637:8:
| 637 | if (G_LIKELY (expr)) \
| | ^
| | |
| | (2) following ‘true’ branch...
../cogl/cogl/cogl-bitmap.c:292:3: note: in expansion of macro ‘g_return_val_if_fail’
| 292 | g_return_val_if_fail (cogl_is_buffer (buffer), NULL);
| | ^~~~~~~~~~~~~~~~~~~~
|
‘cogl_bitmap_new_from_buffer’: events 3-4
|
| 294 | bmp = cogl_bitmap_new_for_data (buffer->context,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (3) ...to here
| | (4) calling ‘cogl_bitmap_new_for_data’ from ‘cogl_bitmap_new_from_buffer’
| 295 | width, height,
| | ~~~~~~~~~~~~~~
| 296 | format,
| | ~~~~~~~
| 297 | rowstride,
| | ~~~~~~~~~~
| 298 | NULL /* data */);
| | ~~~~~~~~~~~~~~~~
|
+--> ‘cogl_bitmap_new_for_data’: event 5
|
| 177 | cogl_bitmap_new_for_data (CoglContext *context,
| | ^~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (5) entry to ‘cogl_bitmap_new_for_data’
|
‘cogl_bitmap_new_for_data’: event 6
|
|/usr/include/glib-2.0/glib/gmessages.h:637:8:
| 637 | if (G_LIKELY (expr)) \
| | ^
| | |
| | (6) following ‘false’ branch...
../cogl/cogl/cogl-bitmap.c:186:3: note: in expansion of macro ‘g_return_val_if_fail’
| 186 | g_return_val_if_fail (cogl_is_context (context), NULL);
| | ^~~~~~~~~~~~~~~~~~~~
|
‘cogl_bitmap_new_for_data’: event 7
|
|/usr/include/glib-2.0/glib/gmessages.h:641:9:
| 641 | g_return_if_fail_warning (G_LOG_DOMAIN, \
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (7) ...to here
| 642 | G_STRFUNC, \
| | ~~~~~~~~~~~~
| 643 | #expr); \
| | ~~~~~~
../cogl/cogl/cogl-bitmap.c:186:3: note: in expansion of macro ‘g_return_val_if_fail’
| 186 | g_return_val_if_fail (cogl_is_context (context), NULL);
| | ^~~~~~~~~~~~~~~~~~~~
|
‘cogl_bitmap_new_for_data’: event 8
|
|cc1:
| (8): ‘<return-value>’ is NULL
|
<------+
|
‘cogl_bitmap_new_from_buffer’: events 9-10
|
| 294 | bmp = cogl_bitmap_new_for_data (buffer->context,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (9) return of NULL to ‘cogl_bitmap_new_from_buffer’ from ‘cogl_bitmap_new_for_data’
| 295 | width, height,
| | ~~~~~~~~~~~~~~
| 296 | format,
| | ~~~~~~~
| 297 | rowstride,
| | ~~~~~~~~~~
| 298 | NULL /* data */);
| | ~~~~~~~~~~~~~~~~
| 299 |
| 300 | bmp->buffer = cogl_object_ref (buffer);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (10) dereference of NULL ‘bmp’
|
In function ‘_cogl_texture_pixmap_x11_new’:
../cogl/cogl/winsys/cogl-texture-pixmap-x11.c:385:13: warning: dereference of NULL ‘winsys’ [CWE-690] [-Wanalyzer-null-dereference]
385 | if (winsys->texture_pixmap_x11_create)
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
‘cogl_texture_pixmap_x11_new_left’: events 1-2
|
| 415 | cogl_texture_pixmap_x11_new_left (CoglContext *ctxt,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘cogl_texture_pixmap_x11_new_left’
|......
| 420 | return _cogl_texture_pixmap_x11_new (ctxt, pixmap,
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (2) calling ‘_cogl_texture_pixmap_x11_new’ from ‘cogl_texture_pixmap_x11_new_left’
| 421 | automatic_updates, COGL_TEXTURE_PIXMAP_LEFT,
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 422 | error);
| | ~~~~~~
|
+--> ‘_cogl_texture_pixmap_x11_new’: events 3-8
|
| 297 | _cogl_texture_pixmap_x11_new (CoglContext *ctxt,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (3) entry to ‘_cogl_texture_pixmap_x11_new’
|......
| 315 | if (!XGetGeometry (display, pixmap, &pixmap_root_window,
| | ~
| | |
| | (4) following ‘false’ branch...
|......
| 330 | internal_format = (tex_pixmap->depth >= 32
| | ~~~~~~~~~~~~~~~~~
| | |
| | (5) ...to here
|......
| 350 | if (!XGetWindowAttributes (display, pixmap_root_window, &window_attributes))
| | ~
| | |
| | (6) following ‘false’ branch...
|......
| 360 | tex_pixmap->visual = window_attributes.visual;
| | ~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (7) ...to here
|......
| 365 | damage_base = _cogl_xlib_get_damage_base ();
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (8) calling ‘_cogl_xlib_get_damage_base’ from ‘_cogl_texture_pixmap_x11_new’
|
+--> ‘_cogl_xlib_get_damage_base’: event 9
|
| 236 | _cogl_xlib_get_damage_base (void)
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (9) entry to ‘_cogl_xlib_get_damage_base’
|
‘_cogl_xlib_get_damage_base’: event 10
|
|../cogl/cogl/cogl-context-private.h:306:4:
| 306 | if (ctxvar == NULL) return retval;
| | ^
| | |
| | (10) following ‘true’ branch (when ‘ctxt’ is NULL)...
../cogl/cogl/winsys/cogl-texture-pixmap-x11.c:239:3: note: in expansion of macro ‘_COGL_GET_CONTEXT’
| 239 | _COGL_GET_CONTEXT (ctxt, -1);
| | ^~~~~~~~~~~~~~~~~
|
‘_cogl_xlib_get_damage_base’: event 11
|
| 239 | _COGL_GET_CONTEXT (ctxt, -1);
| | ^
| | |
| | (11) ...to here
../cogl/cogl/cogl-context-private.h:306:28: note: in definition of macro ‘_COGL_GET_CONTEXT’
| 306 | if (ctxvar == NULL) return retval;
| | ^~~~~~
|
<------+
|
‘_cogl_texture_pixmap_x11_new’: events 12-15
|
|../cogl/cogl/winsys/cogl-texture-pixmap-x11.c:365:17:
| 365 | damage_base = _cogl_xlib_get_damage_base ();
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (12) returning to ‘_cogl_texture_pixmap_x11_new’ from ‘_cogl_xlib_get_damage_base’
| 366 | if (automatic_updates && damage_base >= 0)
| | ~
| | |
| | (13) following ‘false’ branch (when ‘automatic_updates == 0’)...
|......
| 379 | tex_pixmap->damage_rect.x1 = 0;
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (14) ...to here
|......
| 384 | winsys = _cogl_texture_pixmap_x11_get_winsys (tex_pixmap);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (15) calling ‘_cogl_texture_pixmap_x11_get_winsys’ from ‘_cogl_texture_pixmap_x11_new’
|
+--> ‘_cogl_texture_pixmap_x11_get_winsys’: event 16
|
| 122 | _cogl_texture_pixmap_x11_get_winsys (CoglTexturePixmapX11 *tex_pixmap)
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (16) entry to ‘_cogl_texture_pixmap_x11_get_winsys’
|
‘_cogl_texture_pixmap_x11_get_winsys’: event 17
|
|../cogl/cogl/cogl-context-private.h:306:4:
| 306 | if (ctxvar == NULL) return retval;
| | ^
| | |
| | (17) following ‘true’ branch (when ‘ctx’ is NULL)...
../cogl/cogl/winsys/cogl-texture-pixmap-x11.c:126:3: note: in expansion of macro ‘_COGL_GET_CONTEXT’
| 126 | _COGL_GET_CONTEXT (ctx, NULL);
| | ^~~~~~~~~~~~~~~~~
|
‘_cogl_texture_pixmap_x11_get_winsys’: event 18
|
| 126 | _COGL_GET_CONTEXT (ctx, NULL);
| | ^~~~
| | |
| | (18) ...to here
../cogl/cogl/cogl-context-private.h:306:28: note: in definition of macro ‘_COGL_GET_CONTEXT’
| 306 | if (ctxvar == NULL) return retval;
| | ^~~~~~
|
‘_cogl_texture_pixmap_x11_get_winsys’: event 19
|
|cc1:
| (19): ‘<return-value>’ is NULL
|
<------+
|
‘_cogl_texture_pixmap_x11_new’: events 20-21
|
|../cogl/cogl/winsys/cogl-texture-pixmap-x11.c:384:12:
| 384 | winsys = _cogl_texture_pixmap_x11_get_winsys (tex_pixmap);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (20) return of NULL to ‘_cogl_texture_pixmap_x11_new’ from ‘_cogl_texture_pixmap_x11_get_winsys’
| 385 | if (winsys->texture_pixmap_x11_create)
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (21) dereference of NULL ‘winsys’
|
In function ‘cogl_texture_pixmap_x11_update_area’:
../cogl/cogl/winsys/cogl-texture-pixmap-x11.c:553:13: warning: dereference of NULL ‘winsys’ [CWE-690] [-Wanalyzer-null-dereference]
553 | winsys->texture_pixmap_x11_damage_notify (tex_pixmap);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
‘cogl_texture_pixmap_x11_update_area’: events 1-4
|
| 536 | cogl_texture_pixmap_x11_update_area (CoglTexturePixmapX11 *tex_pixmap,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘cogl_texture_pixmap_x11_update_area’
|......
| 549 | if (tex_pixmap->winsys)
| | ~
| | |
| | (2) following ‘true’ branch...
|......
| 552 | winsys = _cogl_texture_pixmap_x11_get_winsys (tex_pixmap);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (3) ...to here
| | (4) calling ‘_cogl_texture_pixmap_x11_get_winsys’ from ‘cogl_texture_pixmap_x11_update_area’
|
+--> ‘_cogl_texture_pixmap_x11_get_winsys’: event 5
|
| 122 | _cogl_texture_pixmap_x11_get_winsys (CoglTexturePixmapX11 *tex_pixmap)
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (5) entry to ‘_cogl_texture_pixmap_x11_get_winsys’
|
‘_cogl_texture_pixmap_x11_get_winsys’: event 6
|
|../cogl/cogl/cogl-context-private.h:306:4:
| 306 | if (ctxvar == NULL) return retval;
| | ^
| | |
| | (6) following ‘true’ branch (when ‘ctx’ is NULL)...
../cogl/cogl/winsys/cogl-texture-pixmap-x11.c:126:3: note: in expansion of macro ‘_COGL_GET_CONTEXT’
| 126 | _COGL_GET_CONTEXT (ctx, NULL);
| | ^~~~~~~~~~~~~~~~~
|
‘_cogl_texture_pixmap_x11_get_winsys’: event 7
|
| 126 | _COGL_GET_CONTEXT (ctx, NULL);
| | ^~~~
| | |
| | (7) ...to here
../cogl/cogl/cogl-context-private.h:306:28: note: in definition of macro ‘_COGL_GET_CONTEXT’
| 306 | if (ctxvar == NULL) return retval;
| | ^~~~~~
|
‘_cogl_texture_pixmap_x11_get_winsys’: event 8
|
|cc1:
| (8): ‘<return-value>’ is NULL
|
<------+
|
‘cogl_texture_pixmap_x11_update_area’: events 9-10
|
|../cogl/cogl/winsys/cogl-texture-pixmap-x11.c:552:16:
| 552 | winsys = _cogl_texture_pixmap_x11_get_winsys (tex_pixmap);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (9) return of NULL to ‘cogl_texture_pixmap_x11_update_area’ from ‘_cogl_texture_pixmap_x11_get_winsys’
| 553 | winsys->texture_pixmap_x11_damage_notify (tex_pixmap);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (10) dereference of NULL ‘winsys’
|
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:22,
from /usr/include/pango-1.0/pango/pango-coverage.h:25,
from /usr/include/pango-1.0/pango/pango-font.h:25,
from /usr/include/pango-1.0/pango/pango-attributes.h:25,
from /usr/include/pango-1.0/pango/pango.h:25,
from ../clutter/clutter/clutter-backend.h:32,
from ../clutter/clutter/clutter-backend-private.h:25,
from ../clutter/clutter/clutter-backend.c:45:
../clutter/clutter/clutter-backend.c: In function ‘CLUTTER_SEAT_GET_CLASS’:
/usr/include/glib-2.0/gobject/gtype.h:2310:42: warning: dereference of NULL ‘ptr’ [CWE-690] [-Wanalyzer-null-dereference]
2310 | #define _G_TYPE_IGC(ip, gt, ct) ((ct*) (((GTypeInstance*) ip)->g_class))
| ^
/usr/include/glib-2.0/gobject/gtype.h:527:66: note: in expansion of macro ‘_G_TYPE_IGC’
527 | #define G_TYPE_INSTANCE_GET_CLASS(instance, g_type, c_type) (_G_TYPE_IGC ((instance), (g_type), c_type))
| ^~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:1512:12: note: in expansion of macro ‘G_TYPE_INSTANCE_GET_CLASS’
1512 | return G_TYPE_INSTANCE_GET_CLASS (ptr, module_obj_name##_get_type (), ModuleObjName##Class); } \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
../clutter/clutter/clutter-seat.h:37:1: note: in expansion of macro ‘G_DECLARE_DERIVABLE_TYPE’
37 | G_DECLARE_DERIVABLE_TYPE (ClutterSeat, clutter_seat,
| ^~~~~~~~~~~~~~~~~~~~~~~~
‘_clutter_backend_free_event_data’: events 1-2
|
|../clutter/clutter/clutter-backend.c:768:1:
| 768 | _clutter_backend_free_event_data (ClutterBackend *backend,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘_clutter_backend_free_event_data’
|......
| 774 | seat = clutter_backend_get_default_seat (backend);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (2) calling ‘clutter_backend_get_default_seat’ from ‘_clutter_backend_free_event_data’
|
+--> ‘clutter_backend_get_default_seat’: event 3
|
| 1028 | clutter_backend_get_default_seat (ClutterBackend *backend)
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (3) entry to ‘clutter_backend_get_default_seat’
|
‘clutter_backend_get_default_seat’: event 4
|
|/usr/include/glib-2.0/glib/gmessages.h:637:8:
| 637 | if (G_LIKELY (expr)) \
| | ^
| | |
| | (4) following ‘false’ branch...
../clutter/clutter/clutter-backend.c:1030:3: note: in expansion of macro ‘g_return_val_if_fail’
| 1030 | g_return_val_if_fail (CLUTTER_IS_BACKEND (backend), NULL);
| | ^~~~~~~~~~~~~~~~~~~~
|
‘clutter_backend_get_default_seat’: event 5
|
|/usr/include/glib-2.0/glib/gmessages.h:641:9:
| 641 | g_return_if_fail_warning (G_LOG_DOMAIN, \
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (5) ...to here
| 642 | G_STRFUNC, \
| | ~~~~~~~~~~~~
| 643 | #expr); \
| | ~~~~~~
../clutter/clutter/clutter-backend.c:1030:3: note: in expansion of macro ‘g_return_val_if_fail’
| 1030 | g_return_val_if_fail (CLUTTER_IS_BACKEND (backend), NULL);
| | ^~~~~~~~~~~~~~~~~~~~
|
‘clutter_backend_get_default_seat’: event 6
|
|cc1:
| (6): ‘<return-value>’ is NULL
|
<------+
|
‘_clutter_backend_free_event_data’: events 7-8
|
| 774 | seat = clutter_backend_get_default_seat (backend);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (7) return of NULL to ‘_clutter_backend_free_event_data’ from ‘clutter_backend_get_default_seat’
| 775 | seat_class = CLUTTER_SEAT_GET_CLASS (seat);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (8) calling ‘CLUTTER_SEAT_GET_CLASS’ from ‘_clutter_backend_free_event_data’
|
+--> ‘CLUTTER_SEAT_GET_CLASS’: event 9
|
|../clutter/clutter/clutter-seat.h:38:6:
| 38 | CLUTTER, SEAT, GObject)
| | ^~~~~~~
| | |
| | (9) entry to ‘CLUTTER_SEAT_GET_CLASS’
/usr/include/glib-2.0/gobject/gtype.h:1511:54: note: in definition of macro ‘G_DECLARE_DERIVABLE_TYPE’
| 1511 | G_GNUC_UNUSED static inline ModuleObjName##Class * MODULE##_##OBJ_NAME##_GET_CLASS (gpointer ptr) { \
| | ^~~~~~
|
‘CLUTTER_SEAT_GET_CLASS’: event 10
|
| 2310 | #define _G_TYPE_IGC(ip, gt, ct) ((ct*) (((GTypeInstance*) ip)->g_class))
| | ^
| | |
| | (10) dereference of NULL ‘ptr’
/usr/include/glib-2.0/gobject/gtype.h:527:66: note: in expansion of macro ‘_G_TYPE_IGC’
| 527 | #define G_TYPE_INSTANCE_GET_CLASS(instance, g_type, c_type) (_G_TYPE_IGC ((instance), (g_type), c_type))
| | ^~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:1512:12: note: in expansion of macro ‘G_TYPE_INSTANCE_GET_CLASS’
| 1512 | return G_TYPE_INSTANCE_GET_CLASS (ptr, module_obj_name##_get_type (), ModuleObjName##Class); } \
| | ^~~~~~~~~~~~~~~~~~~~~~~~~
../clutter/clutter/clutter-seat.h:37:1: note: in expansion of macro ‘G_DECLARE_DERIVABLE_TYPE’
| 37 | G_DECLARE_DERIVABLE_TYPE (ClutterSeat, clutter_seat,
| | ^~~~~~~~~~~~~~~~~~~~~~~~
|
In function ‘create_for_builtin_display_rotation’:
../src/backends/meta-monitor-config-manager.c:1023:37: warning: dereference of NULL ‘logical_monitor_config’ [CWE-690] [-Wanalyzer-null-dereference]
1023 | logical_monitor_config->transform = transform;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
‘meta_monitor_config_manager_create_for_rotate_monitor’: events 1-2
|
| 1048 | meta_monitor_config_manager_create_for_rotate_monitor (MetaMonitorConfigManager *config_manager)
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘meta_monitor_config_manager_create_for_rotate_monitor’
| 1049 | {
| 1050 | return create_for_builtin_display_rotation (config_manager, TRUE, META_MONITOR_TRANSFORM_NORMAL);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (2) calling ‘create_for_builtin_display_rotation’ from ‘meta_monitor_config_manager_create_for_rotate_monitor’
|
+--> ‘create_for_builtin_display_rotation’: events 3-6
|
| 979 | create_for_builtin_display_rotation (MetaMonitorConfigManager *config_manager,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (3) entry to ‘create_for_builtin_display_rotation’
|......
| 989 | if (!config_manager->current_config)
| | ~
| | |
| | (4) following ‘false’ branch...
|......
| 992 | current_configs = config_manager->current_config->logical_monitor_configs;
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (5) ...to here
| 993 | current_logical_monitor_config =
| 994 | find_logical_config_for_builtin_display_rotation (config_manager,
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (6) calling ‘find_logical_config_for_builtin_display_rotation’ from ‘create_for_builtin_display_rotation’
| 995 | current_configs);
| | ~~~~~~~~~~~~~~~~
|
+--> ‘find_logical_config_for_builtin_display_rotation’: events 7-13
|
| 947 | find_logical_config_for_builtin_display_rotation (MetaMonitorConfigManager *config_manager,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (7) entry to ‘find_logical_config_for_builtin_display_rotation’
|......
| 956 | if (panel && meta_monitor_is_active (panel))
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | | | |
| | | | (9) ...to here
| | | (10) following ‘true’ branch...
| | (8) following ‘true’ branch (when ‘panel’ is non-NULL)...
| 957 | {
| 958 | for (l = logical_monitor_configs; l; l = l->next)
| | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | | |
| | | (11) ...to here
| | (12) following ‘true’ branch (when ‘l’ is non-NULL)...
| 959 | {
| 960 | logical_monitor_config = l->data;
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (13) ...to here
|
<------+
|
‘create_for_builtin_display_rotation’: events 14-21
|
| 994 | find_logical_config_for_builtin_display_rotation (config_manager,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (14) returning to ‘create_for_builtin_display_rotation’ from ‘find_logical_config_for_builtin_display_rotation’
| 995 | current_configs);
| | ~~~~~~~~~~~~~~~~
| 996 | if (!current_logical_monitor_config)
| | ~
| | |
| | (15) following ‘false’ branch (when ‘current_logical_monitor_config’ is non-NULL)...
|......
| 999 | if (rotate)
| | ~
| | |
| | (16) ...to here
| | (17) following ‘true’ branch (when ‘rotate != 0’)...
| 1000 | transform = (current_logical_monitor_config->transform + 1) % META_MONITOR_TRANSFORM_FLIPPED;
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (18) ...to here
|......
| 1016 | if (current_logical_monitor_config->transform == transform)
| | ~
| | |
| | (19) following ‘false’ branch...
|......
| 1020 | clone_logical_monitor_config_list (config_manager->current_config->logical_monitor_configs);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | | |
| | | (20) ...to here
| | (21) calling ‘clone_logical_monitor_config_list’ from ‘create_for_builtin_display_rotation’
|
+--> ‘clone_logical_monitor_config_list’: events 22-25
|
| 923 | clone_logical_monitor_config_list (GList *logical_monitor_configs_in)
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (22) entry to ‘clone_logical_monitor_config_list’
|......
| 930 | for (l = logical_monitor_configs_in; l; l = l->next)
| | ~~~
| | |
| | (23) following ‘true’ branch (when ‘l’ is non-NULL)...
| 931 | {
| 932 | logical_monitor_config_in = l->data;
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (24) ...to here
|......
| 937 | clone_monitor_config_list (logical_monitor_config_in->monitor_configs);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (25) calling ‘clone_monitor_config_list’ from ‘clone_logical_monitor_config_list’
|
+--> ‘clone_monitor_config_list’: events 26-28
|
| 898 | clone_monitor_config_list (GList *monitor_configs_in)
| | ^~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (26) entry to ‘clone_monitor_config_list’
|......
| 905 | for (l = monitor_configs_in; l; l = l->next)
| | ~~~
| | |
| | (27) following ‘false’ branch (when ‘l’ is NULL)...
|......
| 919 | return monitor_configs_out;
| | ~~~~~~~~~~~~~~~~~~~
| | |
| | (28) ...to here
|
<------+
|
‘clone_logical_monitor_config_list’: events 29-31
|
| 930 | for (l = logical_monitor_configs_in; l; l = l->next)
| | ~~~
| | |
| | (30) following ‘false’ branch (when ‘l’ is NULL)...
|......
| 937 | clone_monitor_config_list (logical_monitor_config_in->monitor_configs);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (29) returning to ‘clone_logical_monitor_config_list’ from ‘clone_monitor_config_list’
|......
| 943 | return logical_monitor_configs_out;
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (31) ...to here
|
<------+
|
‘create_for_builtin_display_rotation’: events 32-33
|
| 1020 | clone_logical_monitor_config_list (config_manager->current_config->logical_monitor_configs);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (32) returning to ‘create_for_builtin_display_rotation’ from ‘clone_logical_monitor_config_list’
| 1021 | logical_monitor_config =
| 1022 | find_logical_config_for_builtin_display_rotation (config_manager, logical_monitor_configs);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (33) calling ‘find_logical_config_for_builtin_display_rotation’ from ‘create_for_builtin_display_rotation’
|
+--> ‘find_logical_config_for_builtin_display_rotation’: event 34
|
| 947 | find_logical_config_for_builtin_display_rotation (MetaMonitorConfigManager *config_manager,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (34) entry to ‘find_logical_config_for_builtin_display_rotation’
|
‘find_logical_config_for_builtin_display_rotation’: event 35
|
|cc1:
| (35): ‘<return-value>’ is NULL
|
<------+
|
‘create_for_builtin_display_rotation’: events 36-37
|
| 1022 | find_logical_config_for_builtin_display_rotation (config_manager, logical_monitor_configs);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (36) return of NULL to ‘create_for_builtin_display_rotation’ from ‘find_logical_config_for_builtin_display_rotation’
| 1023 | logical_monitor_config->transform = transform;
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (37) dereference of NULL ‘logical_monitor_config’
|
In file included from /usr/include/glib-2.0/glib.h:62,
from ../clutter/clutter/x11/clutter-x11.h:40,
from ../src/backends/x11/meta-event-x11.h:29,
from ../src/backends/x11/meta-seat-x11.c:23:
../src/backends/x11/meta-seat-x11.c: In function ‘meta_seat_x11_translate_event’:
../src/backends/x11/meta-seat-x11.c:1823:46: warning: dereference of NULL ‘stage_x11’ [CWE-690] [-Wanalyzer-null-dereference]
1823 | (unsigned int) stage_x11->xwin,
| ~~~~~~~~~^~~~~~
/usr/include/glib-2.0/glib/gmessages.h:346:32: note: in definition of macro ‘g_debug’
346 | __VA_ARGS__)
| ^~~~~~~~~~~
‘meta_seat_x11_translate_event’: events 1-10
|
|../src/backends/x11/meta-seat-x11.c:1603:6:
| 1603 | if (meta_keymap_x11_handle_event (seat->keymap, xevent))
| | ^
| | |
| | (1) following ‘false’ branch...
|......
| 1606 | cookie = &xevent->xcookie;
| | ~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (2) ...to here
| 1607 |
| 1608 | if (cookie->type != GenericEvent ||
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | | |
| | | (5) following ‘false’ branch...
| | (3) following ‘false’ branch...
| 1609 | cookie->extension != seat->opcode)
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (4) ...to here
|......
| 1612 | xi_event = (XIEvent *) cookie->data;
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (6) ...to here
| 1613 |
| 1614 | if (!xi_event)
| | ~
| | |
| | (7) following ‘false’ branch (when ‘xi_event’ is non-NULL)...
|......
| 1617 | if (cookie->evtype == XI_RawMotion ||
| | ~~~~~~~~~~~~~~~
| | | |
| | | (8) ...to here
| | (9) following ‘false’ branch...
| 1618 | cookie->evtype == XI_RawButtonPress ||
| | ~~~~~~~~~~~~~~
| | |
| | (10) ...to here
|
‘meta_seat_x11_translate_event’: events 11-12
|
| 1617 | if (cookie->evtype == XI_RawMotion ||
| | ^
| | |
| | (11) following ‘false’ branch...
| 1618 | cookie->evtype == XI_RawButtonPress ||
| 1619 | cookie->evtype == XI_RawButtonRelease)
| | ~~~~~~~~~~~~~~
| | |
| | (12) ...to here
|
‘meta_seat_x11_translate_event’: events 13-17
|
| 1618 | cookie->evtype == XI_RawButtonPress ||
| | ^
| | |
| | (13) following ‘false’ branch...
|......
| 1625 | if (!(xi_event->evtype == XI_HierarchyChanged ||
| | ~~~~~~~~~~~~~~~~
| | |
| | (14) ...to here
|......
| 1638 | switch (xi_event->evtype)
| | ~~~~~~
| | |
| | (15) following ‘case 4 ... 5:’ branch...
|......
| 1756 | case XI_ButtonPress:
| | ~~~~
| | |
| | (16) ...to here
|......
| 1762 | if (!source_device)
| | ~
| | |
| | (17) following ‘false’ branch (when ‘source_device’ is non-NULL)...
|
‘meta_seat_x11_translate_event’: event 18
|
| 1766 | GINT_TO_POINTER (xev->deviceid));
/usr/lib64/glib-2.0/include/glibconfig.h:101:49: note: in definition of macro ‘GINT_TO_POINTER’
| 101 | #define GINT_TO_POINTER(i) ((gpointer) (glong) (i))
| | ^
|
‘meta_seat_x11_translate_event’: events 19-26
|
|../src/backends/x11/meta-seat-x11.c:1774:5:
| 1774 | if (clutter_input_device_get_device_type (source_device) == CLUTTER_PAD_DEVICE)
| | ^
| | |
| | (19) following ‘true’ branch...
|......
| 1777 | XIAllowEvents (clutter_x11_get_default_display (),
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (20) ...to here
| 1778 | xev->sourceid,
| | ~~~~~~~~~~~~~~
| 1779 | XIAsyncDevice,
| | ~~~~~~~~~~~~~~
| 1780 | xev->time);
| | ~~~~~~~~~~
|......
| 1784 | if (xev->detail >= 4 && xev->detail <= 7)
| | ~
| | |
| | (21) following ‘false’ branch...
|......
| 1796 | (xi_event->evtype == XI_ButtonPress) ? CLUTTER_PAD_BUTTON_PRESS
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (22) ...to here
| 1797 | : CLUTTER_PAD_BUTTON_RELEASE;
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (23) following ‘false’ branch...
| | (24) ...to here
|......
| 1803 | if (xev->detail > 7)
| | ~
| | |
| | (25) following ‘false’ branch...
|......
| 1807 | event->pad_button.button = xev->detail - 1;
| | ~~~~~~~~~~~
| | |
| | (26) ...to here
|
‘meta_seat_x11_translate_event’: event 27
|
| 1823 | (unsigned int) stage_x11->xwin,
| | ~~~~~~~~~^~~~~~
| | |
| | (27) dereference of NULL ‘stage_x11’
/usr/include/glib-2.0/glib/gmessages.h:346:32: note: in definition of macro ‘g_debug’
| 346 | __VA_ARGS__)
| | ^~~~~~~~~~~
|
../src/core/workspace.c: In function ‘meta_workspace_get_onmonitor_region’:
../src/core/workspace.c:1161:14: warning: dereference of NULL ‘data’ [CWE-690] [-Wanalyzer-null-dereference]
1161 | return data->logical_monitor_region;
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~
‘meta_workspace_get_onmonitor_region’: events 1-2
|
| 1152 | meta_workspace_get_onmonitor_region (MetaWorkspace *workspace,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘meta_workspace_get_onmonitor_region’
|......
| 1157 | ensure_work_areas_validated (workspace);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (2) calling ‘ensure_work_areas_validated’ from ‘meta_workspace_get_onmonitor_region’
|
+--> ‘ensure_work_areas_validated’: events 3-5
|
| 795 | ensure_work_areas_validated (MetaWorkspace *workspace)
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (3) entry to ‘ensure_work_areas_validated’
|......
| 806 | if (!workspace->work_areas_invalid)
| | ~
| | |
| | (4) following ‘true’ branch...
| 807 | return;
| | ~~~~~~
| | |
| | (5) ...to here
|
<------+
|
‘meta_workspace_get_onmonitor_region’: events 6-7
|
| 1157 | ensure_work_areas_validated (workspace);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (6) returning to ‘meta_workspace_get_onmonitor_region’ from ‘ensure_work_areas_validated’
| 1158 |
| 1159 | data = meta_workspace_get_logical_monitor_data (workspace, logical_monitor);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (7) calling ‘meta_workspace_get_logical_monitor_data’ from ‘meta_workspace_get_onmonitor_region’
|
+--> ‘meta_workspace_get_logical_monitor_data’: events 8-9
|
| 94 | meta_workspace_get_logical_monitor_data (MetaWorkspace *workspace,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (8) entry to ‘meta_workspace_get_logical_monitor_data’
|......
| 97 | if (!workspace->logical_monitor_data)
| | ~
| | |
| | (9) following ‘true’ branch...
|
‘meta_workspace_get_logical_monitor_data’: event 10
|
| 98 | return NULL;
| | ^~~~
| | |
| | (10) ...to here
|
‘meta_workspace_get_logical_monitor_data’: event 11
|
|cc1:
| (11): ‘<return-value>’ is NULL
|
<------+
|
‘meta_workspace_get_onmonitor_region’: events 12-13
|
| 1159 | data = meta_workspace_get_logical_monitor_data (workspace, logical_monitor);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (12) return of NULL to ‘meta_workspace_get_onmonitor_region’ from ‘meta_workspace_get_logical_monitor_data’
| 1160 |
| 1161 | return data->logical_monitor_region;
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (13) dereference of NULL ‘data’
|
In function ‘meta_x11_wm_user_lower_and_unfocus’:
../src/x11/meta-x11-window-control.c:109:51: warning: dereference of NULL ‘window’ [CWE-690] [-Wanalyzer-null-dereference]
109 | MetaWorkspaceManager *workspace_manager = window->display->workspace_manager;
| ~~~~~~^~~~~~~~~
‘meta_x11_wm_user_lower_and_unfocus’: events 1-2
|
| 104 | meta_x11_wm_user_lower_and_unfocus (MetaX11Display *x11_display,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘meta_x11_wm_user_lower_and_unfocus’
|......
| 108 | MetaWindow *window = window_from_frame (x11_display, frame_xwindow);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (2) calling ‘window_from_frame’ from ‘meta_x11_wm_user_lower_and_unfocus’
|
+--> ‘window_from_frame’: events 3-5
|
| 39 | window_from_frame (MetaX11Display *x11_display,
| | ^~~~~~~~~~~~~~~~~
| | |
| | (3) entry to ‘window_from_frame’
|......
| 45 | if (!window || !window->frame)
| | ~
| | |
| | (4) following ‘true’ branch (when ‘window’ is NULL)...
| 46 | {
| 47 | meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (5) ...to here
|
‘window_from_frame’: event 6
|
|cc1:
| (6): ‘<return-value>’ is NULL
|
<------+
|
‘meta_x11_wm_user_lower_and_unfocus’: events 7-8
|
| 108 | MetaWindow *window = window_from_frame (x11_display, frame_xwindow);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (7) return of NULL to ‘meta_x11_wm_user_lower_and_unfocus’ from ‘window_from_frame’
| 109 | MetaWorkspaceManager *workspace_manager = window->display->workspace_manager;
| | ~~~~~~~~~~~~~~~
| | |
| | (8) dereference of NULL ‘window’
|
In function ‘meta_x11_wm_set_screen_cursor’:
../src/x11/meta-x11-window-control.c:264:3: warning: dereference of NULL ‘window’ [CWE-690] [-Wanalyzer-null-dereference]
264 | meta_frame_set_screen_cursor (window->frame, cursor);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
‘meta_x11_wm_set_screen_cursor’: events 1-2
|
| 258 | meta_x11_wm_set_screen_cursor (MetaX11Display *x11_display,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘meta_x11_wm_set_screen_cursor’
|......
| 262 | MetaWindow *window = window_from_frame (x11_display, frame_on_screen);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (2) calling ‘window_from_frame’ from ‘meta_x11_wm_set_screen_cursor’
|
+--> ‘window_from_frame’: events 3-5
|
| 39 | window_from_frame (MetaX11Display *x11_display,
| | ^~~~~~~~~~~~~~~~~
| | |
| | (3) entry to ‘window_from_frame’
|......
| 45 | if (!window || !window->frame)
| | ~
| | |
| | (4) following ‘true’ branch (when ‘window’ is NULL)...
| 46 | {
| 47 | meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (5) ...to here
|
‘window_from_frame’: event 6
|
|cc1:
| (6): ‘<return-value>’ is NULL
|
<------+
|
‘meta_x11_wm_set_screen_cursor’: events 7-8
|
| 262 | MetaWindow *window = window_from_frame (x11_display, frame_on_screen);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (7) return of NULL to ‘meta_x11_wm_set_screen_cursor’ from ‘window_from_frame’
| 263 |
| 264 | meta_frame_set_screen_cursor (window->frame, cursor);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (8) dereference of NULL ‘window’
|
In file included from /usr/include/glib-2.0/glib/glist.h:33,
from /usr/include/glib-2.0/glib/ghash.h:33,
from /usr/include/glib-2.0/glib.h:50,
from ../src/wayland/meta-wayland-surface.h:24,
from ../src/wayland/meta-wayland-actor-surface.h:24,
from ../src/wayland/meta-wayland-shell-surface.h:24,
from ../src/wayland/meta-wayland-shell-surface.c:24:
../src/wayland/meta-wayland-surface.h: In function ‘meta_get_first_subsurface_node’:
/usr/include/glib-2.0/glib/gnode.h:96:49: warning: dereference of NULL ‘n’ [CWE-690] [-Wanalyzer-null-dereference]
96 | #define G_NODE_IS_LEAF(node) (((GNode*) (node))->children == NULL)
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~
../src/wayland/meta-wayland-surface.h:371:8: note: in expansion of macro ‘G_NODE_IS_LEAF’
371 | if (!G_NODE_IS_LEAF (n))
| ^~~~~~~~~~~~~~
‘meta_wayland_shell_surface_calculate_geometry’: event 1
|
|../src/wayland/meta-wayland-shell-surface.c:49:1:
| 49 | meta_wayland_shell_surface_calculate_geometry (MetaWaylandShellSurface *shell_surface,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘meta_wayland_shell_surface_calculate_geometry’
|
‘meta_wayland_shell_surface_calculate_geometry’: event 2
|
|../src/wayland/meta-wayland-surface.h:378:40:
| 378 | for (GNode *G_PASTE(__n, __LINE__) = meta_get_first_subsurface_node ((surface)); \
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (2) calling ‘meta_get_first_subsurface_node’ from ‘meta_wayland_shell_surface_calculate_geometry’
../src/wayland/meta-wayland-surface.h:378:40: note: in definition of macro ‘META_WAYLAND_SURFACE_FOREACH_SUBSURFACE’
| 378 | for (GNode *G_PASTE(__n, __LINE__) = meta_get_first_subsurface_node ((surface)); \
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
+--> ‘meta_get_first_subsurface_node’: event 3
|
| 366 | meta_get_first_subsurface_node (MetaWaylandSurface *surface)
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (3) entry to ‘meta_get_first_subsurface_node’
|
‘meta_get_first_subsurface_node’: event 4
|
|/usr/include/glib-2.0/glib/gnode.h:303:35:
| 302 | #define g_node_first_child(node) ((node) ? \
| | ~~~~~~~~~~~
| 303 | ((GNode*) (node))->children : NULL)
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
| | |
| | (4) following ‘false’ branch...
../src/wayland/meta-wayland-surface.h:370:7: note: in expansion of macro ‘g_node_first_child’
| 370 | n = g_node_first_child (surface->subsurface_branch_node);
| | ^~~~~~~~~~~~~~~~~~
|
‘meta_get_first_subsurface_node’: event 5
|
|/usr/include/glib-2.0/glib/gnode.h:303:35:
| 302 | #define g_node_first_child(node) ((node) ? \
| | ~~~~~~~~~~~
| 303 | ((GNode*) (node))->children : NULL)
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
| | |
| | (5) ...to here
../src/wayland/meta-wayland-surface.h:370:7: note: in expansion of macro ‘g_node_first_child’
| 370 | n = g_node_first_child (surface->subsurface_branch_node);
| | ^~~~~~~~~~~~~~~~~~
|
‘meta_get_first_subsurface_node’: event 6
|
|/usr/include/glib-2.0/glib/gnode.h:303:35:
| 302 | #define g_node_first_child(node) ((node) ? \
| | ~~~~~~~~~~~
| 303 | ((GNode*) (node))->children : NULL)
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
| | |
| | (6) ‘<unknown>’ is NULL
../src/wayland/meta-wayland-surface.h:370:7: note: in expansion of macro ‘g_node_first_child’
| 370 | n = g_node_first_child (surface->subsurface_branch_node);
| | ^~~~~~~~~~~~~~~~~~
|
‘meta_get_first_subsurface_node’: event 7
|
|/usr/include/glib-2.0/glib/gnode.h:96:49:
| 96 | #define G_NODE_IS_LEAF(node) (((GNode*) (node))->children == NULL)
| | ~~~~~~~~~~~~~~~~~^~~~~~~~~~
| | |
| | (7) dereference of NULL ‘n’
../src/wayland/meta-wayland-surface.h:371:8: note: in expansion of macro ‘G_NODE_IS_LEAF’
| 371 | if (!G_NODE_IS_LEAF (n))
| | ^~~~~~~~~~~~~~
|
In file included from /usr/include/glib-2.0/glib.h:62,
from ../cogl/cogl/cogl-types.h:44,
from ../cogl/cogl/cogl-object.h:34,
from ../cogl/cogl/cogl.h:60,
from ../src/wayland/meta-wayland-buffer.h:31,
from ../src/wayland/meta-wayland-buffer.c:51:
../src/wayland/meta-wayland-buffer.c: In function ‘meta_wayland_buffer_process_damage’:
/usr/include/glib-2.0/glib/gmessages.h:338:25: warning: dereference of NULL ‘error’ [CWE-690] [-Wanalyzer-null-dereference]
338 | #define g_warning(...) g_log (G_LOG_DOMAIN, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
339 | G_LOG_LEVEL_WARNING, \
| ~~~~~~~~~~~~~~~~~~~~~~~
340 | __VA_ARGS__)
| ~~~~~~~~~~~~
../src/wayland/meta-wayland-buffer.c:643:7: note: in expansion of macro ‘g_warning’
643 | g_warning ("Failed to process Wayland buffer damage: %s", error->message);
| ^~~~~~~~~
‘meta_wayland_buffer_process_damage’: event 1
|
| 616 | gboolean res = FALSE;
| | ^~~
| | |
| | (1) ‘error’ is NULL
|
‘meta_wayland_buffer_process_damage’: event 2
|
|/usr/include/glib-2.0/glib/gmessages.h:624:8:
| 624 | if (G_LIKELY (expr)) \
| | ^
| | |
| | (2) following ‘true’ branch...
../src/wayland/meta-wayland-buffer.c:619:3: note: in expansion of macro ‘g_return_if_fail’
| 619 | g_return_if_fail (buffer->resource);
| | ^~~~~~~~~~~~~~~~
|
‘meta_wayland_buffer_process_damage’: events 3-4
|
| 621 | switch (buffer->type)
| | ~~~~~~^~~~~~
| | |
| | (3) ...to here
|......
| 641 | if (!res)
| | ~
| | |
| | (4) following ‘true’ branch (when ‘res == 0’)...
|
‘meta_wayland_buffer_process_damage’: event 5
|
| 643 | g_warning ("Failed to process Wayland buffer damage: %s", error->message);
| | ^~
| | |
| | (5) ...to here
/usr/include/glib-2.0/glib/gmessages.h:340:32: note: in definition of macro ‘g_warning’
| 340 | __VA_ARGS__)
| | ^~~~~~~~~~~
|
‘meta_wayland_buffer_process_damage’: event 6
|
| 338 | #define g_warning(...) g_log (G_LOG_DOMAIN, \
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (6) dereference of NULL ‘error’
| 339 | G_LOG_LEVEL_WARNING, \
| | ~~~~~~~~~~~~~~~~~~~~~~~
| 340 | __VA_ARGS__)
| | ~~~~~~~~~~~~
../src/wayland/meta-wayland-buffer.c:643:7: note: in expansion of macro ‘g_warning’
| 643 | g_warning ("Failed to process Wayland buffer damage: %s", error->message);
| | ^~~~~~~~~
|
In file included from /usr/include/glib-2.0/glib/glist.h:33,
from /usr/include/glib-2.0/glib/ghash.h:33,
from /usr/include/glib-2.0/glib.h:50,
from ../src/wayland/meta-wayland-surface.h:24,
from ../src/wayland/meta-wayland-surface.c:25:
../src/wayland/meta-wayland-surface.h: In function ‘meta_get_first_subsurface_node’:
/usr/include/glib-2.0/glib/gnode.h:96:49: warning: dereference of NULL ‘n’ [CWE-690] [-Wanalyzer-null-dereference]
96 | #define G_NODE_IS_LEAF(node) (((GNode*) (node))->children == NULL)
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~
../src/wayland/meta-wayland-surface.h:371:8: note: in expansion of macro ‘G_NODE_IS_LEAF’
371 | if (!G_NODE_IS_LEAF (n))
| ^~~~~~~~~~~~~~
‘meta_wayland_surface_update_outputs_recursively’: event 1
|
|../src/wayland/meta-wayland-surface.c:1275:1:
| 1275 | meta_wayland_surface_update_outputs_recursively (MetaWaylandSurface *surface)
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘meta_wayland_surface_update_outputs_recursively’
|
‘meta_wayland_surface_update_outputs_recursively’: event 2
|
|../src/wayland/meta-wayland-surface.h:378:40:
| 378 | for (GNode *G_PASTE(__n, __LINE__) = meta_get_first_subsurface_node ((surface)); \
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (2) calling ‘meta_get_first_subsurface_node’ from ‘meta_wayland_surface_update_outputs_recursively’
../src/wayland/meta-wayland-surface.h:378:40: note: in definition of macro ‘META_WAYLAND_SURFACE_FOREACH_SUBSURFACE’
| 378 | for (GNode *G_PASTE(__n, __LINE__) = meta_get_first_subsurface_node ((surface)); \
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
+--> ‘meta_get_first_subsurface_node’: event 3
|
| 366 | meta_get_first_subsurface_node (MetaWaylandSurface *surface)
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (3) entry to ‘meta_get_first_subsurface_node’
|
‘meta_get_first_subsurface_node’: event 4
|
|/usr/include/glib-2.0/glib/gnode.h:303:35:
| 302 | #define g_node_first_child(node) ((node) ? \
| | ~~~~~~~~~~~
| 303 | ((GNode*) (node))->children : NULL)
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
| | |
| | (4) following ‘false’ branch...
../src/wayland/meta-wayland-surface.h:370:7: note: in expansion of macro ‘g_node_first_child’
| 370 | n = g_node_first_child (surface->subsurface_branch_node);
| | ^~~~~~~~~~~~~~~~~~
|
‘meta_get_first_subsurface_node’: event 5
|
|/usr/include/glib-2.0/glib/gnode.h:303:35:
| 302 | #define g_node_first_child(node) ((node) ? \
| | ~~~~~~~~~~~
| 303 | ((GNode*) (node))->children : NULL)
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
| | |
| | (5) ...to here
../src/wayland/meta-wayland-surface.h:370:7: note: in expansion of macro ‘g_node_first_child’
| 370 | n = g_node_first_child (surface->subsurface_branch_node);
| | ^~~~~~~~~~~~~~~~~~
|
‘meta_get_first_subsurface_node’: event 6
|
|/usr/include/glib-2.0/glib/gnode.h:303:35:
| 302 | #define g_node_first_child(node) ((node) ? \
| | ~~~~~~~~~~~
| 303 | ((GNode*) (node))->children : NULL)
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
| | |
| | (6) ‘<unknown>’ is NULL
../src/wayland/meta-wayland-surface.h:370:7: note: in expansion of macro ‘g_node_first_child’
| 370 | n = g_node_first_child (surface->subsurface_branch_node);
| | ^~~~~~~~~~~~~~~~~~
|
‘meta_get_first_subsurface_node’: event 7
|
|/usr/include/glib-2.0/glib/gnode.h:96:49:
| 96 | #define G_NODE_IS_LEAF(node) (((GNode*) (node))->children == NULL)
| | ~~~~~~~~~~~~~~~~~^~~~~~~~~~
| | |
| | (7) dereference of NULL ‘n’
../src/wayland/meta-wayland-surface.h:371:8: note: in expansion of macro ‘G_NODE_IS_LEAF’
| 371 | if (!G_NODE_IS_LEAF (n))
| | ^~~~~~~~~~~~~~
|
../src/wayland/meta-wayland-surface.h: In function ‘meta_wayland_surface_begin_grab_op’:
../src/wayland/meta-wayland-surface.c:1409:10: warning: dereference of NULL ‘window’ [CWE-690] [-Wanalyzer-null-dereference]
1409 | return meta_display_begin_grab_op (window->display,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1410 | window,
| ~~~~~~~
1411 | grab_op,
| ~~~~~~~~
1412 | TRUE, /* pointer_already_grabbed */
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1413 | TRUE, /* frame_action */
| ~~~~~~~~~~~~~~~~~~~~~~~~
1414 | 1, /* button. XXX? */
| ~~~~~~~~~~~~~~~~~~~~~
1415 | 0, /* modmask */
| ~~~~~~~~~~~~~~~~
1416 | meta_display_get_current_time_roundtrip (window->display),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1417 | x, y);
| ~~~~~
‘meta_wayland_surface_begin_grab_op’: events 1-2
|
| 1395 | meta_wayland_surface_begin_grab_op (MetaWaylandSurface *surface,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘meta_wayland_surface_begin_grab_op’
|......
| 1401 | MetaWindow *window = meta_wayland_surface_get_window (surface);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (2) calling ‘meta_wayland_surface_get_window’ from ‘meta_wayland_surface_begin_grab_op’
|
+--> ‘meta_wayland_surface_get_window’: events 3-4
|
| 1788 | meta_wayland_surface_get_window (MetaWaylandSurface *surface)
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (3) entry to ‘meta_wayland_surface_get_window’
| 1789 | {
| 1790 | if (!surface->role)
| | ~
| | |
| | (4) following ‘true’ branch...
|
‘meta_wayland_surface_get_window’: event 5
|
| 1791 | return NULL;
| | ^~~~
| | |
| | (5) ...to here
|
‘meta_wayland_surface_get_window’: event 6
|
|cc1:
| (6): ‘<return-value>’ is NULL
|
<------+
|
‘meta_wayland_surface_begin_grab_op’: events 7-10
|
| 1401 | MetaWindow *window = meta_wayland_surface_get_window (surface);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (7) return of NULL to ‘meta_wayland_surface_begin_grab_op’ from ‘meta_wayland_surface_get_window’
| 1402 |
| 1403 | if (grab_op == META_GRAB_OP_NONE)
| | ~
| | |
| | (8) following ‘false’ branch (when ‘grab_op != 0’)...
|......
| 1409 | return meta_display_begin_grab_op (window->display,
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (9) ...to here
| | (10) dereference of NULL ‘window’
| 1410 | window,
| | ~~~~~~~
| 1411 | grab_op,
| | ~~~~~~~~
| 1412 | TRUE, /* pointer_already_grabbed */
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 1413 | TRUE, /* frame_action */
| | ~~~~~~~~~~~~~~~~~~~~~~~~
| 1414 | 1, /* button. XXX? */
| | ~~~~~~~~~~~~~~~~~~~~~
| 1415 | 0, /* modmask */
| | ~~~~~~~~~~~~~~~~
| 1416 | meta_display_get_current_time_roundtrip (window->display),
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 1417 | x, y);
| | ~~~~~
|
In file included from /usr/include/glib-2.0/glib/glist.h:33,
from /usr/include/glib-2.0/glib/ghash.h:33,
from /usr/include/glib-2.0/glib.h:50,
from ../src/wayland/meta-wayland-surface.h:24,
from ../src/wayland/meta-wayland-actor-surface.h:24,
from ../src/wayland/meta-wayland-subsurface.h:24,
from ../src/wayland/meta-wayland-subsurface.c:23:
../src/wayland/meta-wayland-subsurface.c: In function ‘meta_get_first_subsurface_node’:
/usr/include/glib-2.0/glib/gnode.h:96:49: warning: dereference of NULL ‘n’ [CWE-690] [-Wanalyzer-null-dereference]
96 | #define G_NODE_IS_LEAF(node) (((GNode*) (node))->children == NULL)
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~
../src/wayland/meta-wayland-surface.h:371:8: note: in expansion of macro ‘G_NODE_IS_LEAF’
371 | if (!G_NODE_IS_LEAF (n))
| ^~~~~~~~~~~~~~
‘meta_wayland_subsurface_union_geometry’: event 1
|
|../src/wayland/meta-wayland-subsurface.c:196:1:
| 196 | meta_wayland_subsurface_union_geometry (MetaWaylandSubsurface *subsurface,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘meta_wayland_subsurface_union_geometry’
|
‘meta_wayland_subsurface_union_geometry’: event 2
|
|../src/wayland/meta-wayland-surface.h:378:40:
| 378 | for (GNode *G_PASTE(__n, __LINE__) = meta_get_first_subsurface_node ((surface)); \
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (2) calling ‘meta_get_first_subsurface_node’ from ‘meta_wayland_subsurface_union_geometry’
../src/wayland/meta-wayland-surface.h:378:40: note: in definition of macro ‘META_WAYLAND_SURFACE_FOREACH_SUBSURFACE’
| 378 | for (GNode *G_PASTE(__n, __LINE__) = meta_get_first_subsurface_node ((surface)); \
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
+--> ‘meta_get_first_subsurface_node’: event 3
|
| 366 | meta_get_first_subsurface_node (MetaWaylandSurface *surface)
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (3) entry to ‘meta_get_first_subsurface_node’
|
‘meta_get_first_subsurface_node’: event 4
|
|/usr/include/glib-2.0/glib/gnode.h:303:35:
| 302 | #define g_node_first_child(node) ((node) ? \
| | ~~~~~~~~~~~
| 303 | ((GNode*) (node))->children : NULL)
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
| | |
| | (4) following ‘false’ branch...
../src/wayland/meta-wayland-surface.h:370:7: note: in expansion of macro ‘g_node_first_child’
| 370 | n = g_node_first_child (surface->subsurface_branch_node);
| | ^~~~~~~~~~~~~~~~~~
|
‘meta_get_first_subsurface_node’: event 5
|
|/usr/include/glib-2.0/glib/gnode.h:303:35:
| 302 | #define g_node_first_child(node) ((node) ? \
| | ~~~~~~~~~~~
| 303 | ((GNode*) (node))->children : NULL)
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
| | |
| | (5) ...to here
../src/wayland/meta-wayland-surface.h:370:7: note: in expansion of macro ‘g_node_first_child’
| 370 | n = g_node_first_child (surface->subsurface_branch_node);
| | ^~~~~~~~~~~~~~~~~~
|
‘meta_get_first_subsurface_node’: event 6
|
|/usr/include/glib-2.0/glib/gnode.h:303:35:
| 302 | #define g_node_first_child(node) ((node) ? \
| | ~~~~~~~~~~~
| 303 | ((GNode*) (node))->children : NULL)
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
| | |
| | (6) ‘<unknown>’ is NULL
../src/wayland/meta-wayland-surface.h:370:7: note: in expansion of macro ‘g_node_first_child’
| 370 | n = g_node_first_child (surface->subsurface_branch_node);
| | ^~~~~~~~~~~~~~~~~~
|
‘meta_get_first_subsurface_node’: event 7
|
|/usr/include/glib-2.0/glib/gnode.h:96:49:
| 96 | #define G_NODE_IS_LEAF(node) (((GNode*) (node))->children == NULL)
| | ~~~~~~~~~~~~~~~~~^~~~~~~~~~
| | |
| | (7) dereference of NULL ‘n’
../src/wayland/meta-wayland-surface.h:371:8: note: in expansion of macro ‘G_NODE_IS_LEAF’
| 371 | if (!G_NODE_IS_LEAF (n))
| | ^~~~~~~~~~~~~~
|
Edited by Robert Mader