g_{message,warning}: Use printf style

The g_message() and g_warning functions expect printf style of
arguments. That is, whenever we want to print a string, it has
to be preceded with "%s" format.
This commit is contained in:
Michal Privoznik
2013-02-04 15:20:28 +01:00
parent 0c212ee8ca
commit f2890032fe
2 changed files with 2 additions and 2 deletions

View File

@ -637,7 +637,7 @@ remote_viewer_start(VirtViewerApp *app)
g_free(path);
if (error) {
virt_viewer_app_simple_message_dialog(app, _("Invalid file %s"), guri);
g_warning(error->message);
g_warning("%s", error->message);
g_clear_error(&error);
goto cleanup;
}

View File

@ -134,7 +134,7 @@ virt_viewer_auth_vnc_credentials(VirtViewerSession *session,
}
if (wantPassword && virt_viewer_file_is_set(file, "password")) {
password = virt_viewer_file_get_password(file);
g_message (password);
g_message("%s", password);
wantPassword = FALSE;
}
}