alpine 3.6
obsolete weakness #49

1

Weakness Breakdown


Definition:

An obsolete weakness occurs when someone uses deprecated or obsolete functions when building a system. As a programming language evolves, some functions occasionally become obsolete.

Warning code(s):

This C routine is considered obsolete.

File Name:

yad/src/yad-0.39.0/src/notebook.c

Context:

The highlighted line of code below is the trigger point of this particular Alpine 3.6 obsolete weakness.

       s = gtk_socket_new ();
      gtk_container_add (GTK_CONTAINER (a), s);
      g_object_set_data (G_OBJECT (a), "socket", s);

      gtk_notebook_append_page (GTK_NOTEBOOK (w), a, get_label ((gchar *) tab->data, 0));
    }

  /* set active tab */
  if (options.notebook_data.active <= 0)
    options.notebook_data.active = 1;
  gtk_notebook_set_current_page (GTK_NOTEBOOK (w), options.notebook_data.active - 1);

  return w;
}

void
notebook_swallow_childs (void)
{
  guint i, n_tabs;

  n_tabs = g_slist_length (options.notebook_data.tabs);

  /* wait until all children are register */
  while (tabs[0].xid != n_tabs)
    usleep (1000);

  for (i = 1; i <= n_tabs; i++)
    {
      GtkWidget *s =
        GTK_WIDGET (g_object_get_data
                    (G_OBJECT (gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), i - 1)), "socket"));

      if (tabs[i].pid != -1)
        gtk_socket_add_id (GTK_SOCKET (s), tabs[i].xid);
    }
}

void
notebook_print_result (void)
{
  guint i, n_tabs;

  n_tabs = g_slist_length (options.notebook_data.tabs);
  for (i = 1; i <= n_tabs; i++)
    {
      if (tabs[i].pid != -1)
        kill (tabs[i].pid, SIGUSR1);
    }
}
 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.