summaryrefslogtreecommitdiff
path: root/src/anastasis/anastasis-gtk_handle-secret-buttons.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/anastasis/anastasis-gtk_handle-secret-buttons.c')
-rw-r--r--src/anastasis/anastasis-gtk_handle-secret-buttons.c39
1 files changed, 23 insertions, 16 deletions
diff --git a/src/anastasis/anastasis-gtk_handle-secret-buttons.c b/src/anastasis/anastasis-gtk_handle-secret-buttons.c
index 5aa97dc..5193be6 100644
--- a/src/anastasis/anastasis-gtk_handle-secret-buttons.c
+++ b/src/anastasis/anastasis-gtk_handle-secret-buttons.c
@@ -222,18 +222,20 @@ save_secret_dialog_response_cb (GtkDialog *dialog,
{
GtkBuilder *builder = GTK_BUILDER (user_data);
char *filename;
- size_t data_len;
- const char *text;
- void *data;
+ size_t data_len = 0;
+ const char *text = NULL;
+ void *data = NULL;
json_t *cs;
struct GNUNET_JSON_Specification cspec[] = {
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("text",
- &text)),
+ &text),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_varsize ("value",
&data,
- &data_len)),
+ &data_len),
+ NULL),
GNUNET_JSON_spec_end ()
};
@@ -330,16 +332,18 @@ anastasis_gtk_secret_save_as_button_clicked_cb (GtkButton *button,
GtkWidget *ad;
GtkBuilder *builder;
- const char *mime;
- const char *fn;
+ const char *mime = NULL;
+ const char *fn = NULL;
json_t *cs;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("filename",
- &fn)),
+ &fn),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("mime",
- &mime)),
+ &mime),
+ NULL),
GNUNET_JSON_spec_end ()
};
@@ -398,22 +402,25 @@ void
anastasis_gtk_secret_copy_button_clicked_cb (GtkButton *button,
gpointer user_data)
{
- size_t data_len;
- void *data;
- const char *mime;
- const char *text;
+ size_t data_len = 0;
+ void *data = NULL;
+ const char *mime = NULL;
+ const char *text = NULL;
json_t *cs;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_varsize ("value",
&data,
- &data_len)),
+ &data_len),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("mime",
- &mime)),
+ &mime),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("text",
- &text)),
+ &text),
+ NULL),
GNUNET_JSON_spec_end ()
};
GtkClipboard *cb;