bloatpad: Avoid a few theoretical compiler warnings
authorTimm Bäder <mail@baedert.org>
Mon, 18 May 2020 08:17:03 +0000 (10:17 +0200)
committerTimm Bäder <mail@baedert.org>
Mon, 18 May 2020 09:30:08 +0000 (11:30 +0200)
examples/bp/bloatpad.c

index c2ea00b07ff216b3a3cce162a6e787b401f74119..598e1fdbf0f852f5cf3079d923a54a3c7f114b22 100644 (file)
@@ -188,12 +188,11 @@ text_buffer_changed_cb (GtkTextBuffer *buffer,
 
   if (old_n < 3 && n == 3)
     {
-      GNotification *n;
-      n = g_notification_new ("Three lines of text");
-      g_notification_set_body (n, "Keep up the good work!");
-      g_notification_add_button (n, "Start over", "app.clear-all");
-      g_application_send_notification (G_APPLICATION (app), "three-lines", n);
-      g_object_unref (n);
+      GNotification *notification = g_notification_new ("Three lines of text");
+      g_notification_set_body (notification, "Keep up the good work!");
+      g_notification_add_button (notification, "Start over", "app.clear-all");
+      g_application_send_notification (G_APPLICATION (app), "three-lines", notification);
+      g_object_unref (notification);
     }
 }
 
@@ -635,7 +634,7 @@ bloat_pad_class_init (BloatPadClass *class)
 
 }
 
-BloatPad *
+static BloatPad *
 bloat_pad_new (void)
 {
   BloatPad *bloat_pad;