Task #118931 - fixed.err

back to task #118931
download
Error: COMPILER_WARNING (CWE-670):
gtk-4.22.1/demos/gtk-demo/main.c: scope_hint: In function ‘activate_about’
gtk-4.22.1/demos/gtk-demo/main.c:200:74: warning[-Wduplicated-branches]: this condition has identical branches
#  200 |                              g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "",
#      |                                                                          ^
#  198|                                PACKAGE_VERSION,
#  199|                                g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
#  200|->                              g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "",
#  201|                                gtk_get_major_version (),
#  202|                                gtk_get_minor_version (),

Error: COMPILER_WARNING (CWE-670):
gtk-4.22.1/demos/gtk-demo/main.c: scope_hint: In function ‘main’
gtk-4.22.1/demos/gtk-demo/main.c:1163:59: warning[-Wduplicated-branches]: this condition has identical branches
# 1163 |               g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
#      |                                                           ^
# 1161|                 PACKAGE_VERSION,
# 1162|                 g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
# 1163|->               g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
# 1164|   
# 1165|     g_application_set_version (G_APPLICATION (app), version);

Error: COMPILER_WARNING (CWE-670):
gtk-4.22.1/demos/icon-editor/icon-editor-application.c: scope_hint: In function ‘activate_about’
gtk-4.22.1/demos/icon-editor/icon-editor-application.c:65:46: warning[-Wduplicated-branches]: this condition has identical branches
#   65 |                              devel ? VCS_TAG : "",
#      |                                              ^
#   63|                                PACKAGE_VERSION,
#   64|                                devel ? "-" : "",
#   65|->                              devel ? VCS_TAG : "",
#   66|                                gtk_get_major_version (),
#   67|                                gtk_get_minor_version (),

Error: COMPILER_WARNING (CWE-670):
gtk-4.22.1/demos/icon-editor/icon-editor-application.c: scope_hint: In function ‘icon_editor_application_new’
gtk-4.22.1/demos/icon-editor/icon-editor-application.c:277:31: warning[-Wduplicated-branches]: this condition has identical branches
#  277 |               devel ? VCS_TAG : "");
#      |                               ^
#  275|                 PACKAGE_VERSION,
#  276|                 devel ? "-" : "",
#  277|->               devel ? VCS_TAG : "");
#  278|   
#  279|     app = g_object_new (ICON_EDITOR_APPLICATION_TYPE,

Error: COMPILER_WARNING (CWE-670):
gtk-4.22.1/demos/node-editor/node-editor-application.c: scope_hint: In function ‘activate_about’
gtk-4.22.1/demos/node-editor/node-editor-application.c:106:74: warning[-Wduplicated-branches]: this condition has identical branches
#  106 |                              g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "",
#      |                                                                          ^
#  104|                                PACKAGE_VERSION,
#  105|                                g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
#  106|->                              g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "",
#  107|                                gtk_get_major_version (),
#  108|                                gtk_get_minor_version (),

Error: COMPILER_WARNING (CWE-670):
gtk-4.22.1/demos/node-editor/node-editor-application.c: scope_hint: In function ‘node_editor_application_new’
gtk-4.22.1/demos/node-editor/node-editor-application.c:311:59: warning[-Wduplicated-branches]: this condition has identical branches
#  311 |               g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
#      |                                                           ^
#  309|                 PACKAGE_VERSION,
#  310|                 g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
#  311|->               g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
#  312|   
#  313|     app = g_object_new (NODE_EDITOR_APPLICATION_TYPE,

Error: COMPILER_WARNING (CWE-670):
gtk-4.22.1/demos/print-editor/print-editor.c: scope_hint: In function ‘activate_about’
gtk-4.22.1/demos/print-editor/print-editor.c:614:74: warning[-Wduplicated-branches]: this condition has identical branches
#  614 |                              g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "",
#      |                                                                          ^
#  612|                                PACKAGE_VERSION,
#  613|                                g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
#  614|->                              g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "",
#  615|                                gtk_get_major_version (),
#  616|                                gtk_get_minor_version (),

Error: COMPILER_WARNING (CWE-670):
gtk-4.22.1/demos/print-editor/print-editor.c: scope_hint: In function ‘main’
gtk-4.22.1/demos/print-editor/print-editor.c:903:59: warning[-Wduplicated-branches]: this condition has identical branches
#  903 |               g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
#      |                                                           ^
#  901|                 PACKAGE_VERSION,
#  902|                 g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
#  903|->               g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
#  904|   
#  905|     g_application_set_version (G_APPLICATION (app), version);

Error: COMPILER_WARNING (CWE-670):
gtk-4.22.1/demos/widget-factory/widget-factory.c: scope_hint: In function ‘activate_about’
gtk-4.22.1/demos/widget-factory/widget-factory.c:344:74: warning[-Wduplicated-branches]: this condition has identical branches
#  344 |                              g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "",
#      |                                                                          ^
#  342|                                PACKAGE_VERSION,
#  343|                                g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
#  344|->                              g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "",
#  345|                                gtk_get_major_version (),
#  346|                                gtk_get_minor_version (),

Error: COMPILER_WARNING (CWE-670):
gtk-4.22.1/demos/widget-factory/widget-factory.c: scope_hint: In function ‘main’
gtk-4.22.1/demos/widget-factory/widget-factory.c:2727:59: warning[-Wduplicated-branches]: this condition has identical branches
# 2727 |               g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
#      |                                                           ^
# 2725|                 PACKAGE_VERSION,
# 2726|                 g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
# 2727|->               g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
# 2728|     g_application_set_version (G_APPLICATION (app), version);
# 2729|   

Error: COMPILER_WARNING (CWE-476):
gtk-4.22.1/gtk/gtksvg.c:354:17: warning[-Wnull-dereference]: potential null pointer dereference
#  354 |   dest->element = g_strdup (src->element);
#  352|     g_assert (dest != NULL);
#  353|     g_assert (src != NULL);
#  354|->   dest->element = g_strdup (src->element);
#  355|     dest->attribute = g_strdup (src->attribute);
#  356|     dest->start = src->start;

Error: COMPILER_WARNING (CWE-476):
gtk-4.22.1/gtk/gtksvg.c:355:19: warning[-Wnull-dereference]: potential null pointer dereference
#  355 |   dest->attribute = g_strdup (src->attribute);
#  353|     g_assert (src != NULL);
#  354|     dest->element = g_strdup (src->element);
#  355|->   dest->attribute = g_strdup (src->attribute);
#  356|     dest->start = src->start;
#  357|     dest->end = src->end;

Error: COMPILER_WARNING (CWE-476):
gtk-4.22.1/gtk/gtksvg.c:356:15: warning[-Wnull-dereference]: potential null pointer dereference
#  356 |   dest->start = src->start;
#      |   ~~~~~~~~~~~~^~~~~~~~~~~~
#  354|     dest->element = g_strdup (src->element);
#  355|     dest->attribute = g_strdup (src->attribute);
#  356|->   dest->start = src->start;
#  357|     dest->end = src->end;
#  358|   }

Error: COMPILER_WARNING (CWE-476):
gtk-4.22.1/gtk/gtksvg.c:357:13: warning[-Wnull-dereference]: potential null pointer dereference
#  357 |   dest->end = src->end;
#      |   ~~~~~~~~~~^~~~~~~~~~
#  355|     dest->attribute = g_strdup (src->attribute);
#  356|     dest->start = src->start;
#  357|->   dest->end = src->end;
#  358|   }
#  359|   

Error: COMPILER_WARNING (CWE-476):
gtk-4.22.1/gtk/gtksvg.c:364:15: warning[-Wnull-dereference]: potential null pointer dereference
#  364 |   g_free (priv->element);
#  362|   {
#  363|     g_assert (priv != NULL);
#  364|->   g_free (priv->element);
#  365|     g_free (priv->attribute);
#  366|   }

Error: COMPILER_WARNING (CWE-476):
gtk-4.22.1/gtk/gtksvg.c:365:15: warning[-Wnull-dereference]: potential null pointer dereference
#  365 |   g_free (priv->attribute);
#  363|     g_assert (priv != NULL);
#  364|     g_free (priv->element);
#  365|->   g_free (priv->attribute);
#  366|   }
#  367|   

Error: COMPILER_WARNING (CWE-476):
gtk-4.22.1/gtk/gtksvg.c: scope_hint: In function ‘gtk_svg_error_set_element’
gtk-4.22.1/gtk/gtksvg.c:376:17: warning[-Wnull-dereference]: potential null pointer dereference
#  376 |   priv->element = g_strdup (element);
#  374|     GtkSvgErrorPrivate *priv = gtk_svg_error_get_private (error);
#  375|     g_assert (error->domain == GTK_SVG_ERROR);
#  376|->   priv->element = g_strdup (element);
#  377|   }
#  378|   

Error: COMPILER_WARNING (CWE-476):
gtk-4.22.1/gtk/gtksvg.c: scope_hint: In function ‘gtk_svg_error_set_attribute’
gtk-4.22.1/gtk/gtksvg.c:385:19: warning[-Wnull-dereference]: potential null pointer dereference
#  385 |   priv->attribute = g_strdup (attribute);
#  383|     GtkSvgErrorPrivate *priv = gtk_svg_error_get_private (error);
#  384|     g_assert (error->domain == GTK_SVG_ERROR);
#  385|->   priv->attribute = g_strdup (attribute);
#  386|   }
#  387|   

Error: COMPILER_WARNING (CWE-476):
gtk-4.22.1/gtk/gtksvg.c:396:17: warning[-Wnull-dereference]: potential null pointer dereference
#  396 |     priv->start = *start;
#      |     ~~~~~~~~~~~~^~~~~~~~
#  394|     g_assert (error->domain == GTK_SVG_ERROR);
#  395|     if (start)
#  396|->     priv->start = *start;
#  397|     if (end)
#  398|       priv->end = *end;

Error: COMPILER_WARNING (CWE-476):
gtk-4.22.1/gtk/gtksvg.c:398:15: warning[-Wnull-dereference]: potential null pointer dereference
#  398 |     priv->end = *end;
#      |     ~~~~~~~~~~^~~~~~
#  396|       priv->start = *start;
#  397|     if (end)
#  398|->     priv->end = *end;
#  399|   }
#  400|   

Error: CPPCHECK_WARNING (CWE-664):
gtk-4.22.1/gtk/gtksvg.c:801: error[va_end_missing]: va_list 'args' was opened but not closed by va_end().
#  799|   
#  800|         if (list == NULL)
#  801|->         return FALSE;
#  802|   
#  803|         if (strcmp (name, (const char *) list->data) != 0)

Error: CPPCHECK_WARNING (CWE-119):
gtk-4.22.1/gtk/gtksvg.c:3874: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: orig->values
# 3872|   
# 3873|         p = (SvgNumbers *) svg_value_alloc (&SVG_NUMBERS_CLASS, svg_numbers_size (2));
# 3874|->       memcpy (p->values, orig->values, sizeof (Number) * 2);
# 3875|   
# 3876|         font_size = shape_get_current_font_size (shape, attr, context);

Error: CPPCHECK_WARNING (CWE-119):
gtk-4.22.1/gtk/gtksvg.c:3874: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: p->values
# 3872|   
# 3873|         p = (SvgNumbers *) svg_value_alloc (&SVG_NUMBERS_CLASS, svg_numbers_size (2));
# 3874|->       memcpy (p->values, orig->values, sizeof (Number) * 2);
# 3875|   
# 3876|         font_size = shape_get_current_font_size (shape, attr, context);

Error: CPPCHECK_WARNING (CWE-823):
gtk-4.22.1/gtk/gtksvg.c:7826: error[arrayIndexOutOfBounds]: Array 'a->dashes[2]' accessed at index 3, which is out of bounds.
# 7824|         for (unsigned int i = 0; i < n; i++)
# 7825|           {
# 7826|->           a->dashes[i].unit = SVG_UNIT_NUMBER;
# 7827|             a->dashes[i].value = values[i];
# 7828|           }

Error: CPPCHECK_WARNING (CWE-823):
gtk-4.22.1/gtk/gtksvg.c:7827: error[arrayIndexOutOfBounds]: Array 'a->dashes[2]' accessed at index 3, which is out of bounds.
# 7825|           {
# 7826|             a->dashes[i].unit = SVG_UNIT_NUMBER;
# 7827|->           a->dashes[i].value = values[i];
# 7828|           }
# 7829|   

Error: CPPCHECK_WARNING (CWE-758):
gtk-4.22.1/gtk/gtksvg.c:12155: error[missingReturn]: Found an exit path from function with non-void return type that has missing return statement
#12153|       case SHAPE_SWITCH:
#12154|         g_error ("Attempt to get the path of a %s", shape_types[shape->type].name);
#12155|->       break;
#12156|       default:
#12157|         g_assert_not_reached ();

Error: CPPCHECK_WARNING (CWE-457):
gtk-4.22.1/gtk/gtksvg.c:16087: error[legacyUninitvar]: Uninitialized variable: direction
#16085|     frames = g_array_new (FALSE, FALSE, sizeof (Frame));
#16086|   
#16087|->   construct_moving_frames (direction,
#16088|                              da->gpa.easing,
#16089|                              da->gpa.segment,

Error: CPPCHECK_WARNING (CWE-457):
gtk-4.22.1/gtk/gtksvg.c:16752: warning[uninitvar]: Uninitialized variable: length
#16750|   
#16751|             for (unsigned int i = 1; i < points->len; i++)
#16752|->             g_array_index (points, double, i) /= length;
#16753|   
#16754|             a->motion.path = gsk_path_builder_free_to_path (builder);

Error: CPPCHECK_WARNING (CWE-457):
gtk-4.22.1/gtk/gtksvg.c:20678: error[legacyUninitvar]: Uninitialized variable: res
#20676|               g_assert_not_reached ();
#20677|   
#20678|->           if (res)
#20679|               {
#20680|                 if (i == 0)