diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 6774ebc28d..8116901d9e 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -134,8 +134,8 @@
*
* |[
* // Pressing Alt+H will activate this button
- * button = gtk_button_new ();
- * label = gtk_label_new_with_mnemonic ("_Hello");
+ * GtkWidget *button = gtk_button_new ();
+ * GtkWidget *label = gtk_label_new_with_mnemonic ("_Hello");
* gtk_container_add (GTK_CONTAINER (button), label);
* ]|
*
@@ -144,7 +144,7 @@
*
* |[
* // Pressing Alt+H will activate this button
- * button = gtk_button_new_with_mnemonic ("_Hello");
+ * GtkWidget *button = gtk_button_new_with_mnemonic ("_Hello");
* ]|
*
* To create a mnemonic for a widget alongside the label, such as a
@@ -153,8 +153,8 @@
*
* |[
* // Pressing Alt+H will focus the entry
- * entry = gtk_entry_new ();
- * label = gtk_label_new_with_mnemonic ("_Hello");
+ * GtkWidget *entry = gtk_entry_new ();
+ * GtkWidget *label = gtk_label_new_with_mnemonic ("_Hello");
* gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
* ]|
*
@@ -166,7 +166,7 @@
*
* Here’s how to create a label with a small font:
* |[
- * label = gtk_label_new (NULL);
+ * GtkWidget *label = gtk_label_new (NULL);
* gtk_label_set_markup (GTK_LABEL (label), "Small text");
* ]|
*
@@ -237,9 +237,10 @@
* |[
* const gchar *text =
* "Go to the"
- * ""
+ * ""
* "GTK+ website for more...";
- * gtk_label_set_markup (label, text);
+ * GtkWidget *label = gtk_label_new (NULL);
+ * gtk_label_set_markup (GTK_LABEL (label), text);
* ]|
*
* It is possible to implement custom handling for links and their tooltips with
@@ -2696,6 +2697,8 @@ gtk_label_set_markup_internal (GtkLabel *label,
* g_markup_escape_text() or g_markup_printf_escaped():
*
* |[
+ * GtkWidget *label = gtk_label_new (NULL);
+ * const char *str = "...";
* const char *format = "\%s";
* char *markup;
*