Package: granule / 1.4.0-7-9

0007-GCC-warnings.patch Patch series | download
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
From: "Barak A. Pearlmutter" <bap@debian.org>
Date: Mon, 31 Jul 2017 16:38:17 +0200
Subject: GCC warnings

---
 src/AppearanceDB.cpp    | 2 +-
 src/CSVExportDialog.cpp | 4 ++--
 src/CSVImportDialog.cpp | 4 ++--
 src/Granule.cpp         | 2 +-
 src/ScheduleDB.cpp      | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/AppearanceDB.cpp b/src/AppearanceDB.cpp
index 8e8d35e..cb4305e 100644
--- a/src/AppearanceDB.cpp
+++ b/src/AppearanceDB.cpp
@@ -259,7 +259,7 @@ void
 AppearanceDB::
 save_to_xml_config (xmlTextWriterPtr writer_)
 {
-	int ret = 0;
+	int ret;
 
     //--------------------------------------------------------------------------
 	ret = xmlTextWriterStartElement (writer_, BAD_CAST "front_app");
diff --git a/src/CSVExportDialog.cpp b/src/CSVExportDialog.cpp
index cc2fa1f..a1a9d73 100644
--- a/src/CSVExportDialog.cpp
+++ b/src/CSVExportDialog.cpp
@@ -359,7 +359,7 @@ const char*
 CSVExportDialog::
 get_separator () const 
 {
-	char* ret = "";
+	const char* ret = "";
 
 	switch (m_sep_selection) 
 	{
@@ -376,7 +376,7 @@ const char*
 CSVExportDialog::
 get_double_separator () const 
 {
-	char* ret = "";
+	const char* ret = "";
 
 	switch (m_sep_selection) 
 	{
diff --git a/src/CSVImportDialog.cpp b/src/CSVImportDialog.cpp
index ffb57ea..75c4b3c 100644
--- a/src/CSVImportDialog.cpp
+++ b/src/CSVImportDialog.cpp
@@ -361,7 +361,7 @@ const char*
 CSVImportDialog::
 get_separator () const 
 {
-	char* ret = "";
+	const char* ret = "";
 
 	switch (m_sep_selection) 
 	{
@@ -378,7 +378,7 @@ const char*
 CSVImportDialog::
 get_double_separator () const 
 {
-	char* ret = "";
+	const char* ret = "";
 
 	switch (m_sep_selection) 
 	{
diff --git a/src/Granule.cpp b/src/Granule.cpp
index 87e4174..e232a72 100644
--- a/src/Granule.cpp
+++ b/src/Granule.cpp
@@ -1063,7 +1063,7 @@ const char*
 Granule::
 quality_answer_str (AnswerQuality qa_)
 {
-	static char* result;
+	static const char* result;
 
 	switch (qa_) {
 	case ANSWER_BAD_BLACKOUT: result = "BAD (Complete blackout)";       break;
diff --git a/src/ScheduleDB.cpp b/src/ScheduleDB.cpp
index 5c630f3..9526fc2 100644
--- a/src/ScheduleDB.cpp
+++ b/src/ScheduleDB.cpp
@@ -358,7 +358,7 @@ save_to_xml_config (xmlTextWriterPtr writer_)
 	ret = xmlTextWriterWriteAttribute (writer_, BAD_CAST "efactor",
 									   BAD_CAST buf);
 
-	snprintf (buf, sizeof(buf), "%d", m_capacity);
+	snprintf (buf, sizeof(buf), "%z", m_capacity);
 	ret = xmlTextWriterWriteAttribute (writer_, BAD_CAST "capacity",
 									   BAD_CAST buf);