summaryrefslogtreecommitdiffstats
path: root/audio/lingot/format_string.diff
blob: 6255311b76e382c33b674647a8c0c74684485027 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From 4247d5d3e88a5d900fc79b900f9fa2ae346a7bfb Mon Sep 17 00:00:00 2001
From: Niv Sardi <xaiki@evilgiggle.com>
Date: Wed, 28 Sep 2011 17:42:06 -0300
Subject: [PATCH] Fixed bug #643435 in debian: error: format not a string
 literal and no format arguments [-Werror=format-security]
 Removed compilation warning [-Wunused-but-set-variable]

 Patch Author: Ibán Cereijo Graña <ibancg@gmail.com>

Signed-off-by: Niv Sardi <xaiki@evilgiggle.com>
---
 ChangeLog                  |    4 ++++
 src/lingot-gui-mainframe.c |    5 ++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 34a56de..1fe3f89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@

+2011-09-27 Ibán Cereijo <ibancg@gmail.com>
+
+	* Fixed bug #643435 in debian
+
 2011-08-13 Ibán Cereijo <ibancg@gmail.com>

 	* Fixed bug #34007 (#637610 in debian).
diff --git a/src/lingot-gui-mainframe.c b/src/lingot-gui-mainframe.c
index 30c1b69..6124a44 100644
--- a/src/lingot-gui-mainframe.c
+++ b/src/lingot-gui-mainframe.c
@@ -201,7 +201,6 @@ gboolean lingot_gui_mainframe_callback_gauge_computation(gpointer data) {
 	unsigned int period;
 	double error_cents;
 	LingotMainFrame* frame = (LingotMainFrame*) data;
-	unsigned short note_index;

 	period = 1000 / GAUGE_RATE;
 	frame->gauge_computation_uid = g_timeout_add(period,
@@ -211,7 +210,7 @@ gboolean lingot_gui_mainframe_callback_gauge_computation(gpointer data) {
 			< 10.0)) {
 		lingot_gauge_compute(frame->gauge, frame->conf->gauge_rest_value);
 	} else {
-		note_index = lingot_gui_mainframe_get_closest_note_index(
+		lingot_gui_mainframe_get_closest_note_index(
 				frame->core->freq, frame->conf->scale,
 				frame->conf->root_frequency_error, &error_cents);
 		lingot_gauge_compute(frame->gauge, error_cents);
@@ -242,7 +241,7 @@ gboolean lingot_gui_mainframe_callback_error_dispatcher(gpointer data) {
 							(message_type == ERROR) ? GTK_MESSAGE_ERROR
 									: ((message_type == WARNING) ? GTK_MESSAGE_WARNING
 											: GTK_MESSAGE_INFO),
-							GTK_BUTTONS_CLOSE, error_message);
+							GTK_BUTTONS_CLOSE, "%s", error_message);
 			gtk_window_set_title(GTK_WINDOW(message_dialog), (message_type
 					== ERROR) ? _("Error")
 					: ((message_type == WARNING) ? _("Warning") : _("Info")));
--
1.7.7.rc1