Commit e0797509 authored by Bastien Nocera's avatar Bastien Nocera

pairing-dialog: Fix uninitialised variable

lib/bluetooth-pairing-dialog.c: In function ‘bluetooth_pairing_dialog_set_mode’:
include/glib-2.0/glib/gmacros.h:928:7: warning: ‘help’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  928 |    if (expr)                                    \
      |       ^
lib/bluetooth-pairing-dialog.c:69:8: note: ‘help’ was declared here
   69 |  char *help;
      |        ^~~~
parent cee657da
Pipeline #132355 passed with stage
in 3 minutes and 5 seconds
......@@ -65,8 +65,8 @@ bluetooth_pairing_dialog_set_mode (BluetoothPairingDialog *self,
const char *device_name)
{
BluetoothPairingDialogPrivate *priv = BLUETOOTH_PAIRING_DIALOG_GET_PRIVATE (self);
char *title;
char *help;
g_autofree char *title = NULL;
g_autofree char *help = NULL;
GtkStyleContext *context;
priv->mode = mode;
......@@ -159,8 +159,6 @@ bluetooth_pairing_dialog_set_mode (BluetoothPairingDialog *self,
gtk_label_set_text (GTK_LABEL (priv->title), title);
gtk_label_set_text (GTK_LABEL (priv->help_label), help);
g_free (title);
g_free (help);
}
BluetoothPairingMode
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment