Skip to content
Snippets Groups Projects
Commit 25dd7e7b authored by Guido Gunther's avatar Guido Gunther :zzz:
Browse files

Initialize g_auto{ptr,free} variables

parent 17cbfa93
No related branches found
No related tags found
1 merge request!84Split Wayland registry code into separate class
......@@ -827,13 +827,13 @@ sigterm_cb (gpointer unused)
int main(int argc, char *argv[])
{
g_autoptr(GSource) sigterm;
GMainContext *context;
g_autoptr(GOptionContext) opt_context;
g_autoptr(GSource) sigterm = NULL;
GMainContext *context = NULL;
g_autoptr(GOptionContext) opt_context = NULL;
GError *err = NULL;
gboolean unlocked = FALSE;
g_autoptr(PhoshWayland) wl;
g_autoptr(PhoshShell) shell;
g_autoptr(PhoshWayland) wl = NULL;
g_autoptr(PhoshShell) shell = NULL;
const GOptionEntry options [] = {
{"unlocked", 'U', 0, G_OPTION_ARG_NONE, &unlocked,
......
......@@ -63,7 +63,7 @@ icon_to_pixbuf (PhoshWWanInfo *self,
GtkIconTheme *theme)
{
PhoshWWanInfoPrivate *priv = phosh_wwan_info_get_instance_private (self);
g_autoptr(GtkIconInfo) info;
g_autoptr(GtkIconInfo) info = NULL;
GdkPixbuf *pixbuf;
GError *error = NULL;
......@@ -99,7 +99,7 @@ pixbuf_overlay_access_tec (PhoshWWanInfo *self,
PangoFontDescription *desc;
gint tw = 0, th = 0, scale;
guint width, height;
g_autofree char *font;
g_autofree char *font = NULL;
width = gdk_pixbuf_get_width (source);
height = gdk_pixbuf_get_height (source);
......@@ -156,7 +156,6 @@ update_icon_data(PhoshWWanInfo *self, PhoshWWanMM *wwan, gpointer unused)
PhoshWWanInfoPrivate *priv;
guint quality;
GtkIconTheme *icon_theme;
//g_autoptr(GIcon) icon = NULL;
g_autoptr(GdkPixbuf) src = NULL, dest = NULL;
g_autofree gchar *icon_name = NULL;
const char *access_tec;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment