1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

regedit: Fix format-nonliteral warning

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Amitay Isaacs 2016-08-08 14:21:14 +10:00 committed by Jeremy Allison
parent 44baf81e83
commit 5855b039dd
3 changed files with 19 additions and 7 deletions

View File

@ -157,7 +157,7 @@ static void add_reg_key(struct regedit *regedit, struct tree_node *node,
if (subkey) {
msg = "Enter name of new subkey";
}
dialog_input(regedit, &name, "New Key", msg);
dialog_input(regedit, &name, "New Key", "%s", msg);
if (name) {
WERROR rv;
struct registry_key *new_key;

View File

@ -1758,6 +1758,12 @@ static bool input_on_submit(struct dialog *dia, struct dialog_section *section,
return true;
}
static int dialog_input_internal(TALLOC_CTX *ctx, void *output,
enum input_type type,
const char *title,
const char *msg, va_list ap)
PRINTF_ATTRIBUTE(5,0);
static int dialog_input_internal(TALLOC_CTX *ctx, void *output,
enum input_type type,
const char *title,

View File

@ -147,9 +147,12 @@ void dialog_modal_loop(struct dialog *dia, WERROR *err,
enum dialog_action *action);
struct dialog_section *dialog_section_label_new_va(TALLOC_CTX *ctx,
const char *msg, va_list ap);
const char *msg,
va_list ap)
PRINTF_ATTRIBUTE(2,0);
struct dialog_section *dialog_section_label_new(TALLOC_CTX *ctx,
const char *msg, ...);
const char *msg, ...)
PRINTF_ATTRIBUTE(2,3);
struct dialog_section *dialog_section_hsep_new(TALLOC_CTX *ctx, int sep);
@ -208,14 +211,17 @@ enum dialog_type {
};
int dialog_notice(TALLOC_CTX *ctx, enum dialog_type type,
const char *title, const char *msg, ...);
const char *title, const char *msg, ...)
PRINTF_ATTRIBUTE(4,5);
int dialog_input(TALLOC_CTX *ctx, const char **output, const char *title,
const char *msg, ...);
const char *msg, ...) PRINTF_ATTRIBUTE(4,5);
int dialog_input_long(TALLOC_CTX *ctx, long *output,
const char *title, const char *msg, ...);
const char *title, const char *msg, ...)
PRINTF_ATTRIBUTE(4,5);
int dialog_input_ulong(TALLOC_CTX *ctx, unsigned long *output,
const char *title, const char *msg, ...);
const char *title, const char *msg, ...)
PRINTF_ATTRIBUTE(4,5);
struct registry_key;
struct value_item;