r17278 - gnucash/branches/2.2/src - [r17254] Fix -Wformat gcc warnings.
Christian Stimming
cstim at cvs.gnucash.org
Mon Jul 7 16:56:50 EDT 2008
Author: cstim
Date: 2008-07-07 16:56:49 -0400 (Mon, 07 Jul 2008)
New Revision: 17278
Trac: http://svn.gnucash.org/trac/changeset/17278
Modified:
gnucash/branches/2.2/src/app-utils/gfec.c
gnucash/branches/2.2/src/backend/file/io-utils.c
gnucash/branches/2.2/src/bin/gnucash-bin.c
gnucash/branches/2.2/src/business/business-gnome/dialog-billterms.c
gnucash/branches/2.2/src/business/business-gnome/dialog-customer.c
gnucash/branches/2.2/src/business/business-gnome/dialog-employee.c
gnucash/branches/2.2/src/business/business-gnome/dialog-invoice.c
gnucash/branches/2.2/src/business/business-gnome/dialog-job.c
gnucash/branches/2.2/src/business/business-gnome/dialog-order.c
gnucash/branches/2.2/src/business/business-gnome/dialog-payment.c
gnucash/branches/2.2/src/business/business-gnome/dialog-vendor.c
gnucash/branches/2.2/src/business/business-ledger/gncEntryLedgerControl.c
gnucash/branches/2.2/src/business/dialog-tax-table/dialog-tax-table.c
gnucash/branches/2.2/src/gnome-search/dialog-search.c
gnucash/branches/2.2/src/gnome-utils/dialog-account.c
gnucash/branches/2.2/src/gnome-utils/dialog-transfer.c
gnucash/branches/2.2/src/gnome-utils/druid-gconf-setup.c
gnucash/branches/2.2/src/gnome-utils/druid-gnc-xml-import.c
gnucash/branches/2.2/src/gnome-utils/gnc-file.c
gnucash/branches/2.2/src/gnome-utils/gnc-gnome-utils.c
gnucash/branches/2.2/src/gnome-utils/gnc-html.c
gnucash/branches/2.2/src/gnome/dialog-commodities.c
gnucash/branches/2.2/src/gnome/dialog-fincalc.c
gnucash/branches/2.2/src/gnome/dialog-price-editor.c
gnucash/branches/2.2/src/gnome/dialog-print-check.c
gnucash/branches/2.2/src/gnome/dialog-sx-editor.c
gnucash/branches/2.2/src/gnome/druid-acct-period.c
gnucash/branches/2.2/src/gnome/druid-loan.c
gnucash/branches/2.2/src/gnome/druid-merge.c
gnucash/branches/2.2/src/gnome/druid-stock-split.c
gnucash/branches/2.2/src/gnome/gnc-plugin-basic-commands.c
gnucash/branches/2.2/src/gnome/gnc-split-reg.c
gnucash/branches/2.2/src/gnome/window-reconcile.c
gnucash/branches/2.2/src/import-export/hbci/hbci-interaction.c
gnucash/branches/2.2/src/import-export/log-replay/gnc-log-replay.c
gnucash/branches/2.2/src/register/ledger-core/split-register-control.c
gnucash/branches/2.2/src/register/ledger-core/split-register.c
gnucash/branches/2.2/src/report/report-gnome/gnc-plugin-page-report.c
Log:
[r17254] Fix -Wformat gcc warnings.
Originally by andi5.
Modified: gnucash/branches/2.2/src/app-utils/gfec.c
===================================================================
--- gnucash/branches/2.2/src/app-utils/gfec.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/app-utils/gfec.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -169,7 +169,7 @@
static void
error_handler(const char *msg)
{
- g_warning(msg);
+ g_warning("%s", msg);
error_in_scm_eval = TRUE;
}
Modified: gnucash/branches/2.2/src/backend/file/io-utils.c
===================================================================
--- gnucash/branches/2.2/src/backend/file/io-utils.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/backend/file/io-utils.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -48,7 +48,7 @@
void
write_emacs_trailer(FILE *out)
{
- fprintf(out, emacs_trailer);
+ fprintf(out, "%s", emacs_trailer);
}
static void
Modified: gnucash/branches/2.2/src/bin/gnucash-bin.c
===================================================================
--- gnucash/branches/2.2/src/bin/gnucash-bin.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/bin/gnucash-bin.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -141,7 +141,7 @@
update_message(const gchar *msg)
{
gnc_update_splash_screen(msg, GNC_SPLASH_PERCENTAGE_UNKNOWN);
- g_message(msg);
+ g_message("%s", msg);
}
static void
Modified: gnucash/branches/2.2/src/business/business-gnome/dialog-billterms.c
===================================================================
--- gnucash/branches/2.2/src/business/business-gnome/dialog-billterms.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/business/business-gnome/dialog-billterms.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -260,12 +260,12 @@
num = gnc_numeric_zero ();
if (gnc_numeric_negative_p (num)) {
message = _("Negative amounts are not allowed.");
- gnc_error_dialog (nbt->dialog, message);
+ gnc_error_dialog (nbt->dialog, "%s", message);
return FALSE;
}
if (gnc_numeric_compare (num, gnc_numeric_create (100, 1)) > 0) {
message = _("Percentage amount must be between 0 and 100.");
- gnc_error_dialog (nbt->dialog, message);
+ gnc_error_dialog (nbt->dialog, "%s", message);
return FALSE;
}
return TRUE;
@@ -288,7 +288,7 @@
name = gtk_entry_get_text (GTK_ENTRY (nbt->name_entry));
if (name == NULL || *name == '\0') {
message = _("You must provide a name for this Billing Term.");
- gnc_error_dialog (nbt->dialog, message);
+ gnc_error_dialog (nbt->dialog, "%s", message);
return FALSE;
}
if (gncBillTermLookupByName (btw->book, name)) {
Modified: gnucash/branches/2.2/src/business/business-gnome/dialog-customer.c
===================================================================
--- gnucash/branches/2.2/src/business/business-gnome/dialog-customer.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/business/business-gnome/dialog-customer.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -277,7 +277,7 @@
check_entry_nonempty (cw->dialog, cw->addr3_entry, NULL) &&
check_entry_nonempty (cw->dialog, cw->addr4_entry, NULL)) {
const char *msg = _("You must enter a billing address.");
- gnc_error_dialog (cw->dialog, msg);
+ gnc_error_dialog (cw->dialog, "%s", msg);
return;
}
Modified: gnucash/branches/2.2/src/business/business-gnome/dialog-employee.c
===================================================================
--- gnucash/branches/2.2/src/business/business-gnome/dialog-employee.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/business/business-gnome/dialog-employee.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -227,7 +227,7 @@
check_entry_nonempty (ew->dialog, ew->addr3_entry, NULL) &&
check_entry_nonempty (ew->dialog, ew->addr4_entry, NULL)) {
const char *msg = _("You must enter an address.");
- gnc_error_dialog (ew->dialog, msg);
+ gnc_error_dialog (ew->dialog, "%s", msg);
return;
}
Modified: gnucash/branches/2.2/src/business/business-gnome/dialog-invoice.c
===================================================================
--- gnucash/branches/2.2/src/business/business-gnome/dialog-invoice.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/business/business-gnome/dialog-invoice.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -513,7 +513,7 @@
else
msg = g_strdup (message);
- result = gnc_verify_dialog (iw_get_window(iw), FALSE, msg);
+ result = gnc_verify_dialog (iw_get_window(iw), FALSE, "%s", msg);
g_free (msg);
if (!result)
Modified: gnucash/branches/2.2/src/business/business-gnome/dialog-job.c
===================================================================
--- gnucash/branches/2.2/src/business/business-gnome/dialog-job.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/business/business-gnome/dialog-job.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -128,7 +128,7 @@
res = gtk_entry_get_text (GTK_ENTRY (jw->name_entry));
if (safe_strcmp (res, "") == 0) {
const char *message = _("The Job must be given a name.");
- gnc_error_dialog(jw->dialog, message);
+ gnc_error_dialog(jw->dialog, "%s", message);
return FALSE;
}
@@ -137,7 +137,7 @@
res = gncOwnerGetName (&(jw->owner));
if (res == NULL || safe_strcmp (res, "") == 0) {
const char *message = _("You must choose an owner for this job.");
- gnc_error_dialog(jw->dialog, message);
+ gnc_error_dialog(jw->dialog, "%s", message);
return FALSE;
}
Modified: gnucash/branches/2.2/src/business/business-gnome/dialog-order.c
===================================================================
--- gnucash/branches/2.2/src/business/business-gnome/dialog-order.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/business/business-gnome/dialog-order.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -288,7 +288,7 @@
"Are you sure you want to close it out before "
"you invoice all the entries?");
- if (gnc_verify_dialog (ow->dialog, FALSE, message) == FALSE)
+ if (gnc_verify_dialog (ow->dialog, FALSE, "%s", message) == FALSE)
return;
}
Modified: gnucash/branches/2.2/src/business/business-gnome/dialog-payment.c
===================================================================
--- gnucash/branches/2.2/src/business/business-gnome/dialog-payment.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/business/business-gnome/dialog-payment.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -227,7 +227,7 @@
if (gnc_numeric_check (amount) || !gnc_numeric_positive_p (amount)) {
text = _("You must enter the amount of the payment. "
"The payment amount must be greater than zero.");
- gnc_error_dialog (pw->dialog, text);
+ gnc_error_dialog (pw->dialog, "%s", text);
return;
}
@@ -235,7 +235,7 @@
gnc_owner_get_owner (pw->owner_choice, &(pw->owner));
if (pw->owner.owner.undefined == NULL) {
text = _("You must select a company for payment processing.");
- gnc_error_dialog (pw->dialog, text);
+ gnc_error_dialog (pw->dialog, "%s", text);
return;
}
@@ -243,7 +243,7 @@
acc = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT(pw->acct_tree));
if (!acc) {
text = _("You must select a transfer account from the account tree.");
- gnc_error_dialog (pw->dialog, text);
+ gnc_error_dialog (pw->dialog, "%s", text);
return;
}
@@ -251,7 +251,7 @@
text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(pw->post_combo));
if (!text || safe_strcmp (text, "") == 0) {
text = _("You must enter an account name for posting.");
- gnc_error_dialog (pw->dialog, text);
+ gnc_error_dialog (pw->dialog, "%s", text);
return;
}
Modified: gnucash/branches/2.2/src/business/business-gnome/dialog-vendor.c
===================================================================
--- gnucash/branches/2.2/src/business/business-gnome/dialog-vendor.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/business/business-gnome/dialog-vendor.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -214,7 +214,7 @@
check_entry_nonempty (vw->dialog, vw->addr3_entry, NULL) &&
check_entry_nonempty (vw->dialog, vw->addr4_entry, NULL)) {
const char *msg = _("You must enter a payment address.");
- gnc_error_dialog (vw->dialog, msg);
+ gnc_error_dialog (vw->dialog, "%s", msg);
return;
}
Modified: gnucash/branches/2.2/src/business/business-ledger/gncEntryLedgerControl.c
===================================================================
--- gnucash/branches/2.2/src/business/business-ledger/gncEntryLedgerControl.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/business/business-ledger/gncEntryLedgerControl.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -599,7 +599,7 @@
if (!gnc_entry_ledger_verify_can_save (ledger))
return FALSE;
- if (dontask || gnc_verify_dialog (parent, TRUE, message))
+ if (dontask || gnc_verify_dialog (parent, TRUE, "%s", message))
gnc_entry_ledger_save (ledger, TRUE);
else
gnc_entry_ledger_cancel_cursor_changes (ledger);
Modified: gnucash/branches/2.2/src/business/dialog-tax-table/dialog-tax-table.c
===================================================================
--- gnucash/branches/2.2/src/business/dialog-tax-table/dialog-tax-table.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/business/dialog-tax-table/dialog-tax-table.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -110,7 +110,7 @@
name = gtk_entry_get_text (GTK_ENTRY (ntt->name_entry));
if (name == NULL || *name == '\0') {
message = _("You must provide a name for this Tax Table.");
- gnc_error_dialog (ntt->dialog, message);
+ gnc_error_dialog (ntt->dialog, "%s", message);
return FALSE;
}
if (gncTaxTableLookupByName (ttw->book, name)) {
@@ -127,14 +127,14 @@
amount = gnc_amount_edit_get_amount (GNC_AMOUNT_EDIT (ntt->amount_entry));
if (gnc_numeric_negative_p (amount)) {
message = _("Negative amounts are not allowed.");
- gnc_error_dialog (ntt->dialog, message);
+ gnc_error_dialog (ntt->dialog, "%s", message);
return FALSE;
}
if (ntt->type == GNC_AMT_TYPE_PERCENT &&
gnc_numeric_compare (amount,
gnc_numeric_create (100, 1)) > 0) {
message = _("Percentage amount must be between 0 and 100.");
- gnc_error_dialog (ntt->dialog, message);
+ gnc_error_dialog (ntt->dialog, "%s", message);
return FALSE;
}
@@ -142,7 +142,7 @@
acc = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT(ntt->acct_tree));
if (acc == NULL) {
message = _("You must choose a Tax Account.");
- gnc_error_dialog (ntt->dialog, message);
+ gnc_error_dialog (ntt->dialog, "%s", message);
return FALSE;
}
@@ -579,7 +579,7 @@
if (g_list_length (gncTaxTableGetEntries (ttw->current_table)) <= 1) {
char *message = _("You cannot remove the last entry from the tax table. "
"Try deleting the tax table if you want to do that.");
- gnc_error_dialog (ttw->dialog, message);
+ gnc_error_dialog (ttw->dialog, "%s", message);
return;
}
Modified: gnucash/branches/2.2/src/gnome/dialog-commodities.c
===================================================================
--- gnucash/branches/2.2/src/gnome/dialog-commodities.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome/dialog-commodities.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -136,7 +136,7 @@
"at least one of your accounts. You may "
"not delete it.");
- gnc_warning_dialog (cd->dialog, message);
+ gnc_warning_dialog (cd->dialog, "%s", message);
g_list_free (accounts);
return;
}
Modified: gnucash/branches/2.2/src/gnome/dialog-fincalc.c
===================================================================
--- gnucash/branches/2.2/src/gnome/dialog-fincalc.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome/dialog-fincalc.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -394,7 +394,7 @@
{
GtkWidget *entry;
- gnc_error_dialog(fcd->dialog, string);
+ gnc_error_dialog(fcd->dialog, "%s", string);
if (error_item == 0)
entry = fcd->amounts[0];
else
Modified: gnucash/branches/2.2/src/gnome/dialog-price-editor.c
===================================================================
--- gnucash/branches/2.2/src/gnome/dialog-price-editor.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome/dialog-price-editor.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -230,7 +230,7 @@
if (response == GTK_RESPONSE_OK) {
error_str = gui_to_price (pedit_dialog);
if (error_str) {
- gnc_warning_dialog (pedit_dialog->dialog, error_str);
+ gnc_warning_dialog (pedit_dialog->dialog, "%s", error_str);
return;
}
Modified: gnucash/branches/2.2/src/gnome/dialog-print-check.c
===================================================================
--- gnucash/branches/2.2/src/gnome/dialog-print-check.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome/dialog-print-check.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -550,7 +550,7 @@
GTK_BUTTONS_CLOSE,
_("Cannot save check format file."));
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
- error->message);
+ "%s", error->message);
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
g_error_free(error);
Modified: gnucash/branches/2.2/src/gnome/dialog-sx-editor.c
===================================================================
--- gnucash/branches/2.2/src/gnome/dialog-sx-editor.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome/dialog-sx-editor.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -217,7 +217,7 @@
const char *sx_changed_msg =
_( "This SX has changed; are you "
"sure you want to cancel?" );
- if (!gnc_verify_dialog(sxed->dialog, FALSE, sx_changed_msg)) {
+ if (!gnc_verify_dialog(sxed->dialog, FALSE, "%s", sx_changed_msg)) {
return FALSE;
}
}
@@ -635,7 +635,7 @@
_( "Couldn't parse credit formula for "
"split \"%s\"." ),
xaccSplitGetMemo( s ) );
- gnc_error_dialog( GTK_WIDGET(sxed->dialog),
+ gnc_error_dialog( GTK_WIDGET(sxed->dialog), "%s",
errStr->str );
g_string_free( errStr, TRUE );
@@ -661,7 +661,7 @@
_( "Couldn't parse debit formula for "
"split \"%s\"." ),
xaccSplitGetMemo( s ) );
- gnc_error_dialog( GTK_WIDGET(sxed->dialog),
+ gnc_error_dialog( GTK_WIDGET(sxed->dialog), "%s",
(gchar*)errStr->str );
g_string_free( errStr, TRUE );
@@ -712,7 +712,7 @@
if ( strlen(name) == 0 ) {
const char *sx_has_no_name_msg =
_( "Please name the Scheduled Transaction." );
- gnc_error_dialog( sxed->dialog, sx_has_no_name_msg );
+ gnc_error_dialog( sxed->dialog, "%s", sx_has_no_name_msg );
g_free( name );
return FALSE;
@@ -790,7 +790,7 @@
&& !gtk_toggle_button_get_active(sxed->optEndNone) ) {
const char *sx_end_spec_msg =
_( "Please provide a valid end selection." );
- gnc_error_dialog( sxed->dialog, sx_end_spec_msg );
+ gnc_error_dialog( sxed->dialog, "%s", sx_end_spec_msg );
return FALSE;
}
@@ -806,7 +806,7 @@
if ( occur == 0 ) {
const char *sx_occur_count_zero_msg =
_( "There must be some number of occurrences." );
- gnc_error_dialog( sxed->dialog,
+ gnc_error_dialog( sxed->dialog, "%s",
sx_occur_count_zero_msg );
return FALSE;
}
@@ -847,7 +847,8 @@
_("You have attempted to create a Scheduled "
"Transaction which will never run. Do you "
"really want to do this?");
- if (!gnc_verify_dialog(sxed->dialog, FALSE, invalid_sx_check_msg))
+ if (!gnc_verify_dialog(sxed->dialog, FALSE,
+ "%s", invalid_sx_check_msg))
return FALSE;
}
}
@@ -1493,7 +1494,7 @@
return;
}
- if (gnc_verify_dialog(sxed->dialog, TRUE, message)) {
+ if (gnc_verify_dialog(sxed->dialog, TRUE, "%s", message)) {
Transaction *trans;
trans = gnc_split_register_get_current_trans( reg );
if ( !gnc_split_register_save( reg, TRUE ) )
Modified: gnucash/branches/2.2/src/gnome/druid-acct-period.c
===================================================================
--- gnucash/branches/2.2/src/gnome/druid-acct-period.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome/druid-acct-period.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -361,7 +361,7 @@
const char *msg = _("You must select closing date that "
"is greater than the closing date "
"of the previous book.");
- gnc_error_dialog (info->window, msg);
+ gnc_error_dialog (info->window, "%s", msg);
return TRUE;
}
@@ -371,7 +371,7 @@
{
const char *msg = _("You must select closing date "
"that is not in the future.");
- gnc_error_dialog (info->window, msg);
+ gnc_error_dialog (info->window, "%s", msg);
return TRUE;
}
return FALSE;
Modified: gnucash/branches/2.2/src/gnome/druid-loan.c
===================================================================
--- gnucash/branches/2.2/src/gnome/druid-loan.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome/druid-loan.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -1043,7 +1043,7 @@
{
const char *cancelMsg = _( "Are you sure you want to cancel "
"the Mortgage/Loan Setup Druid?" );
- if ( gnc_verify_dialog( ldd->dialog, FALSE, cancelMsg ) ) {
+ if ( gnc_verify_dialog( ldd->dialog, FALSE, "%s", cancelMsg ) ) {
gnc_close_gui_component_by_data( DIALOG_LOAN_DRUID_CM_CLASS,
ldd );
}
Modified: gnucash/branches/2.2/src/gnome/druid-merge.c
===================================================================
--- gnucash/branches/2.2/src/gnome/druid-merge.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome/druid-merge.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -170,7 +170,7 @@
message = g_strdup_printf(_("Error: Please resolve all %d "
"conflicts before trying to commit the data."), count);
top = gtk_widget_get_toplevel (GTK_WIDGET (gnomedruidpage));
- gnc_error_dialog(top, message);
+ gnc_error_dialog(top, "%s", message);
g_free(message);
return TRUE;
}
@@ -224,7 +224,7 @@
if(result != 0) {
message = g_strdup_printf(_("Error: the Commit operation failed, error code %d."), result);
top = gtk_widget_get_toplevel (GTK_WIDGET (gnomedruidpage));
- gnc_error_dialog(top, message);
+ gnc_error_dialog(top, "%s", message);
}
g_return_if_fail(result == 0);
delete_merge_window ();
Modified: gnucash/branches/2.2/src/gnome/druid-stock-split.c
===================================================================
--- gnucash/branches/2.2/src/gnome/druid-stock-split.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome/druid-stock-split.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -306,7 +306,7 @@
if (gnc_numeric_zero_p (amount))
{
const char *message = _("You must enter a distribution amount.");
- gnc_error_dialog (info->window, message);
+ gnc_error_dialog (info->window, "%s", message);
return TRUE;
}
@@ -323,7 +323,7 @@
if (gnc_numeric_negative_p (amount))
{
const char *message = _("The price must be positive.");
- gnc_error_dialog (info->window, message);
+ gnc_error_dialog (info->window, "%s", message);
return TRUE;
}
@@ -370,7 +370,7 @@
if (gnc_numeric_negative_p (amount))
{
const char *message = _("The cash distribution must be positive.");
- gnc_error_dialog (info->window, message);
+ gnc_error_dialog (info->window, "%s", message);
return TRUE;
}
@@ -383,7 +383,7 @@
{
const char *message = _("You must select an income account "
"for the cash distribution.");
- gnc_error_dialog (info->window, message);
+ gnc_error_dialog (info->window, "%s", message);
return TRUE;
}
@@ -392,7 +392,7 @@
{
const char *message = _("You must select an asset account "
"for the cash distribution.");
- gnc_error_dialog (info->window, message);
+ gnc_error_dialog (info->window, "%s", message);
return TRUE;
}
}
Modified: gnucash/branches/2.2/src/gnome/gnc-plugin-basic-commands.c
===================================================================
--- gnucash/branches/2.2/src/gnome/gnc-plugin-basic-commands.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome/gnc-plugin-basic-commands.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -388,7 +388,7 @@
PERR("%s", message);
qof_session_destroy(qsf_session);
qof_event_resume();
- gnc_error_dialog(gnc_ui_get_toplevel(), message);
+ gnc_error_dialog(gnc_ui_get_toplevel(), "%s", message);
LEAVE (" ");
return;
}
@@ -480,7 +480,7 @@
{
if (summary.num_auto_create_no_notify_instances == 0)
{
- gnc_info_dialog(GTK_WIDGET(&window->gtk_window), nothing_to_do_msg);
+ gnc_info_dialog(GTK_WIDGET(&window->gtk_window), "%s", nothing_to_do_msg);
}
else
{
Modified: gnucash/branches/2.2/src/gnome/gnc-split-reg.c
===================================================================
--- gnucash/branches/2.2/src/gnome/gnc-split-reg.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome/gnc-split-reg.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -1109,7 +1109,7 @@
| GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_NONE,
- buf);
+ "%s", buf);
g_free(buf);
recn = xaccSplitGetReconcile (split);
if (recn == YREC || recn == FREC)
Modified: gnucash/branches/2.2/src/gnome/window-reconcile.c
===================================================================
--- gnucash/branches/2.2/src/gnome/window-reconcile.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome/window-reconcile.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -1132,7 +1132,7 @@
"transaction?");
gboolean result;
- result = gnc_verify_dialog(recnData->window, FALSE, message);
+ result = gnc_verify_dialog(recnData->window, FALSE, "%s", message);
if (!result)
return;
@@ -1821,7 +1821,7 @@
{
const char *message = _("You have made changes to this reconcile "
"window. Are you sure you want to cancel?");
- if (!gnc_verify_dialog(recnData->window, FALSE, message))
+ if (!gnc_verify_dialog(recnData->window, FALSE, "%s", message))
return;
}
@@ -1933,7 +1933,7 @@
{
const char *message = _("The account is not balanced. "
"Are you sure you want to finish?");
- if (!gnc_verify_dialog (recnData->window, FALSE, message))
+ if (!gnc_verify_dialog (recnData->window, FALSE, "%s", message))
return;
}
@@ -1990,7 +1990,7 @@
{
const char *message = _("Do you want to postpone this reconciliation "
"and finish it later?");
- if (!gnc_verify_dialog (recnData->window, FALSE, message))
+ if (!gnc_verify_dialog (recnData->window, FALSE, "%s", message))
return;
}
Modified: gnucash/branches/2.2/src/gnome-search/dialog-search.c
===================================================================
--- gnucash/branches/2.2/src/gnome-search/dialog-search.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome-search/dialog-search.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -153,7 +153,7 @@
if (sw->selected_item == NULL && sw->allow_clear == FALSE) {
char *msg = _("You must select an item from the list");
- gnc_error_dialog (sw->dialog, msg);
+ gnc_error_dialog (sw->dialog, "%s", msg);
return;
}
Modified: gnucash/branches/2.2/src/gnome-utils/dialog-account.c
===================================================================
--- gnucash/branches/2.2/src/gnome-utils/dialog-account.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome-utils/dialog-account.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -415,7 +415,7 @@
if (!gnc_account_create_opening_balance (account, balance, date, aw->book))
{
const char *message = _("Could not create opening balance.");
- gnc_error_dialog(aw->dialog, message);
+ gnc_error_dialog(aw->dialog, "%s", message);
}
}
else
@@ -707,7 +707,7 @@
name = gtk_entry_get_text(GTK_ENTRY(aw->name_entry));
if (safe_strcmp(name, "") == 0) {
const char *message = _("The account must be given a name.");
- gnc_error_dialog(aw->dialog, message);
+ gnc_error_dialog(aw->dialog, "%s", message);
LEAVE("bad name");
return FALSE;
}
@@ -729,7 +729,7 @@
if ((account != NULL) &&
!guid_equal(&aw->account, xaccAccountGetGUID (account))) {
const char *message = _("There is already an account with that name.");
- gnc_error_dialog(aw->dialog, message);
+ gnc_error_dialog(aw->dialog, "%s", message);
LEAVE("duplicate name");
return FALSE;
}
@@ -737,7 +737,7 @@
/* Parent check, probably not needed, but be safe */
if (!gnc_filter_parent_accounts(parent, aw)) {
const char *message = _("You must choose a valid parent account.");
- gnc_error_dialog(aw->dialog, message);
+ gnc_error_dialog(aw->dialog, "%s", message);
LEAVE("invalid parent");
return FALSE;
}
@@ -745,7 +745,7 @@
/* check for valid type */
if (aw->type == ACCT_TYPE_INVALID) {
const char *message = _("You must select an account type.");
- gnc_error_dialog(aw->dialog, message);
+ gnc_error_dialog(aw->dialog, "%s", message);
LEAVE("invalid type");
return FALSE;
}
@@ -754,7 +754,7 @@
if (!xaccAccountTypesCompatible (aw->type, xaccAccountGetType (parent))) {
const char *message = _("The selected account type is incompatible with "
"the one of the selected parent.");
- gnc_error_dialog(aw->dialog, message);
+ gnc_error_dialog(aw->dialog, "%s", message);
LEAVE("incompatible types");
return FALSE;
}
@@ -764,7 +764,7 @@
gnc_general_select_get_selected (GNC_GENERAL_SELECT (aw->commodity_edit));
if (!commodity) {
const char *message = _("You must choose a commodity.");
- gnc_error_dialog(aw->dialog, message);
+ gnc_error_dialog(aw->dialog, "%s", message);
LEAVE("invalid commodity");
return FALSE;
}
@@ -817,7 +817,7 @@
{
const char *message = _("You must enter a valid opening balance "
"or leave it blank.");
- gnc_error_dialog(aw->dialog, message);
+ gnc_error_dialog(aw->dialog, "%s", message);
LEAVE(" ");
return;
}
@@ -841,7 +841,7 @@
{
const char *message = _("You must select a transfer account or choose"
" the opening balances equity account.");
- gnc_error_dialog(aw->dialog, message);
+ gnc_error_dialog(aw->dialog, "%s", message);
LEAVE(" ");
return;
}
Modified: gnucash/branches/2.2/src/gnome-utils/dialog-transfer.c
===================================================================
--- gnucash/branches/2.2/src/gnome-utils/dialog-transfer.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome-utils/dialog-transfer.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -1243,7 +1243,7 @@
const char *message = _("You must specify an account to transfer from, "
"or to, or both, for this transaction. "
"Otherwise, it will not be recorded.");
- gnc_error_dialog(xferData->dialog, message);
+ gnc_error_dialog(xferData->dialog, "%s", message);
LEAVE("bad account");
return;
}
@@ -1252,7 +1252,7 @@
{
const char *message = _("You can't transfer from and to the same "
"account!");
- gnc_error_dialog(xferData->dialog, message);
+ gnc_error_dialog(xferData->dialog, "%s", message);
LEAVE("same account");
return;
}
@@ -1279,7 +1279,7 @@
const char *message = _("You can't transfer from a non-currency account. "
"Try reversing the \"from\" and \"to\" accounts "
"and making the \"amount\" negative.");
- gnc_error_dialog(xferData->dialog, message);
+ gnc_error_dialog(xferData->dialog, "%s", message);
LEAVE("non-currency");
return;
}
@@ -1302,7 +1302,7 @@
if (gnc_numeric_zero_p (amount))
{
const char *message = _("You must enter an amount to transfer.");
- gnc_error_dialog(xferData->dialog, message);
+ gnc_error_dialog(xferData->dialog, "%s", message);
LEAVE("invalid from amount");
return;
}
Modified: gnucash/branches/2.2/src/gnome-utils/druid-gconf-setup.c
===================================================================
--- gnucash/branches/2.2/src/gnome-utils/druid-gconf-setup.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome-utils/druid-gconf-setup.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -505,7 +505,7 @@
case HOW_INSTALL:
if (!druid_gconf_install_keys(&error)) {
keep_going = FALSE;
- gnc_error_dialog(NULL, error->message);
+ gnc_error_dialog(NULL, "%s", error->message);
g_error_free(error);
}
break;
@@ -513,7 +513,7 @@
default:
if (!druid_gconf_update_path(&error)) {
keep_going = FALSE;
- gnc_error_dialog(NULL, error->message);
+ gnc_error_dialog(NULL, "%s", error->message);
g_error_free(error);
}
break;
@@ -587,7 +587,7 @@
/* Kill the backend daemon. When it restarts it will find our changes */
if (!g_spawn_command_line_sync("gconftool-2 --shutdown", NULL, NULL,
NULL, &error)) {
- gnc_warning_dialog(NULL, error->message);
+ gnc_warning_dialog(NULL, "%s", error->message);
g_error_free(error);
}
}
Modified: gnucash/branches/2.2/src/gnome-utils/druid-gnc-xml-import.c
===================================================================
--- gnucash/branches/2.2/src/gnome-utils/druid-gnc-xml-import.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome-utils/druid-gnc-xml-import.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -738,7 +738,7 @@
data->subst = NULL;
}
if (message) {
- gnc_error_dialog (data->dialog, message);
+ gnc_error_dialog (data->dialog, "%s", message);
}
if (!success)
gxi_session_destroy (data);
@@ -1033,7 +1033,7 @@
(GCompareFunc) file_filename_cmp)) {
const gchar *message = _(
"That GnuCash XML file is already loaded. Please select another file.");
- gnc_error_dialog (data->dialog, message);
+ gnc_error_dialog (data->dialog, "%s", message);
g_free (filename);
return;
}
@@ -1335,7 +1335,7 @@
if (g_list_find (data->encodings, encoding_ptr)) {
message = _("This encoding has been added to the list already.");
- gnc_error_dialog (data->encodings_dialog, message);
+ gnc_error_dialog (data->encodings_dialog, "%s", message);
return;
}
@@ -1345,7 +1345,7 @@
g_iconv_close (iconv);
g_free (enc_string);
message = _("This is an invalid encoding.");
- gnc_error_dialog (data->encodings_dialog, message);
+ gnc_error_dialog (data->encodings_dialog, "%s", message);
return;
}
g_iconv_close (iconv);
@@ -1480,7 +1480,7 @@
if (!g_list_first (data->files)) {
const gchar *message = _(
"No files to merge. Please add ones by clicking on 'Load another file'.");
- gnc_error_dialog (data->dialog, message);
+ gnc_error_dialog (data->dialog, "%s", message);
return TRUE;
}
Modified: gnucash/branches/2.2/src/gnome-utils/gnc-file.c
===================================================================
--- gnucash/branches/2.2/src/gnome-utils/gnc-file.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome-utils/gnc-file.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -230,7 +230,7 @@
fmt = _("This file/URL appears to be from a newer version "
"of GnuCash. You must upgrade your version of GnuCash "
"to work with this data.");
- gnc_error_dialog (parent, fmt);
+ gnc_error_dialog (parent, "%s", fmt);
break;
case ERR_BACKEND_NO_SUCH_DB:
@@ -395,7 +395,7 @@
case ERR_FILEIO_FILE_BAD_READ:
fmt = _("There was an error reading the file. "
"Do you want to continue?");
- if (gnc_verify_dialog (parent, TRUE, fmt)) { uh_oh = FALSE; }
+ if (gnc_verify_dialog (parent, TRUE, "%s", fmt)) { uh_oh = FALSE; }
break;
case ERR_FILEIO_PARSE_ERROR:
@@ -420,7 +420,7 @@
case ERR_FILEIO_FILE_TOO_OLD:
fmt = _("This file is from an older version of GnuCash. "
"Do you want to continue?");
- if (gnc_verify_dialog (parent, TRUE, fmt)) { uh_oh = FALSE; }
+ if (gnc_verify_dialog (parent, TRUE, "%s", fmt)) { uh_oh = FALSE; }
break;
case ERR_FILEIO_UNKNOWN_FILE_TYPE:
@@ -449,7 +449,7 @@
fmt = _("This database is from an older version of GnuCash. "
"Do you want to want to upgrade the database "
"to the current version?");
- if (gnc_verify_dialog (parent, TRUE, fmt)) { uh_oh = FALSE; }
+ if (gnc_verify_dialog (parent, TRUE, "%s", fmt)) { uh_oh = FALSE; }
break;
case ERR_SQL_DB_BUSY:
@@ -458,7 +458,7 @@
"If there are currently no other users, consult the "
"documentation to learn how to clear out dangling login "
"sessions.");
- gnc_error_dialog (parent, fmt);
+ gnc_error_dialog (parent, "%s", fmt);
break;
default:
Modified: gnucash/branches/2.2/src/gnome-utils/gnc-gnome-utils.c
===================================================================
--- gnucash/branches/2.2/src/gnome-utils/gnc-gnome-utils.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome-utils/gnc-gnome-utils.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -279,7 +279,7 @@
const gchar *message =
_("GnuCash could not find the files for the help documentation. "
"This is likely because the 'gnucash-docs' package is not installed.");
- gnc_error_dialog(NULL, message);
+ gnc_error_dialog(NULL, "%s", message);
}
PERR ("%s", error->message);
g_error_free(error);
Modified: gnucash/branches/2.2/src/gnome-utils/gnc-html.c
===================================================================
--- gnucash/branches/2.2/src/gnome-utils/gnc-html.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/gnome-utils/gnc-html.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -898,7 +898,7 @@
if (!ok)
{
if (result.error_message)
- gnc_error_dialog( html->window, result.error_message);
+ gnc_error_dialog( html->window, "%s", result.error_message);
else
/* %s is a URL (some location somewhere). */
gnc_error_dialog( html->window, _("There was an error accessing %s."), location);
Modified: gnucash/branches/2.2/src/import-export/hbci/hbci-interaction.c
===================================================================
--- gnucash/branches/2.2/src/import-export/hbci/hbci-interaction.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/import-export/hbci/hbci-interaction.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -403,7 +403,7 @@
minsize);
retval = gnc_verify_dialog (GTK_WIDGET (data->parent),
TRUE,
- msg);
+ "%s", msg);
g_free (msg);
if (!retval)
break;
@@ -417,7 +417,7 @@
(long)strlen(passwd), maxLen);
retval = gnc_verify_dialog (GTK_WIDGET (data->parent),
TRUE,
- msg);
+ "%s", msg);
g_free (msg);
if (!retval)
break;
@@ -484,7 +484,7 @@
minsize);
retval = gnc_verify_dialog (GTK_WIDGET (data->parent),
TRUE,
- msg);
+ "%s", msg);
g_free (msg);
if (!retval)
break;
@@ -498,7 +498,7 @@
(long)strlen(passwd), maxLen);
retval = gnc_verify_dialog (GTK_WIDGET (data->parent),
TRUE,
- msg);
+ "%s", msg);
g_free (msg);
if (!retval)
break;
Modified: gnucash/branches/2.2/src/import-export/log-replay/gnc-log-replay.c
===================================================================
--- gnucash/branches/2.2/src/import-export/log-replay/gnc-log-replay.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/import-export/log-replay/gnc-log-replay.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -509,7 +509,7 @@
/* Use g_strdup_printf so we don't get accidental tab -> space conversion */
if (!expected_header)
- expected_header = g_strdup_printf(expected_header_orig);
+ expected_header = g_strdup(expected_header_orig);
qof_log_set_level(GNC_MOD_IMPORT, QOF_LOG_DEBUG);
ENTER(" ");
Modified: gnucash/branches/2.2/src/register/ledger-core/split-register-control.c
===================================================================
--- gnucash/branches/2.2/src/register/ledger-core/split-register-control.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/register/ledger-core/split-register-control.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -1043,7 +1043,7 @@
/* If this is an un-expanded, multi-split transaction, then warn the user */
if (force_dialog && !expanded && !xfer_acc) {
- gnc_error_dialog (gnc_split_register_get_parent (reg), message);
+ gnc_error_dialog (gnc_split_register_get_parent (reg), "%s", message);
return TRUE;
}
@@ -1092,7 +1092,7 @@
if (!expanded && osplit &&
gnc_split_register_split_needs_amount (reg, split) &&
gnc_split_register_split_needs_amount (reg, osplit)) {
- gnc_error_dialog (gnc_split_register_get_parent (reg), message);
+ gnc_error_dialog (gnc_split_register_get_parent (reg), "%s", message);
return TRUE;
}
Modified: gnucash/branches/2.2/src/register/ledger-core/split-register.c
===================================================================
--- gnucash/branches/2.2/src/register/ledger-core/split-register.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/register/ledger-core/split-register.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -723,7 +723,7 @@
if (split != NULL)
result = gnc_verify_dialog (gnc_split_register_get_parent (reg),
- FALSE, message);
+ FALSE, "%s", message);
else
result = TRUE;
@@ -759,7 +759,7 @@
if (split != blank_split)
result = gnc_verify_dialog(gnc_split_register_get_parent(reg),
- FALSE, message);
+ FALSE, "%s", message);
else
result = TRUE;
Modified: gnucash/branches/2.2/src/report/report-gnome/gnc-plugin-page-report.c
===================================================================
--- gnucash/branches/2.2/src/report/report-gnome/gnc-plugin-page-report.c 2008-07-07 20:56:21 UTC (rev 17277)
+++ gnucash/branches/2.2/src/report/report-gnome/gnc-plugin-page-report.c 2008-07-07 20:56:49 UTC (rev 17278)
@@ -1345,7 +1345,7 @@
{
const char *message = _("You cannot save to that file.");
- gnc_error_dialog (NULL, message);
+ gnc_error_dialog (NULL, "%s", message);
g_free(filepath);
return NULL;
}
More information about the gnucash-changes
mailing list