diff --git a/src/Config.cpp b/src/Config.cpp index 5d3be250e..8f87ee75c 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include "task.h" #include "Config.h" diff --git a/src/Date.cpp b/src/Date.cpp index 0a8feee34..0e12c96cd 100644 --- a/src/Date.cpp +++ b/src/Date.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include "task.h" #include "Date.h" @@ -156,7 +157,7 @@ int Date::daysInMonth (int month, int year) //////////////////////////////////////////////////////////////////////////////// std::string Date::monthName (int month) { - static char* months[12] = + static const char* months[12] = { "January", "February", @@ -180,7 +181,7 @@ std::string Date::monthName (int month) //////////////////////////////////////////////////////////////////////////////// void Date::dayName (int dow, std::string& name) { - static char* days[7] = + static const char* days[7] = { "Sunday", "Monday", @@ -197,7 +198,7 @@ void Date::dayName (int dow, std::string& name) //////////////////////////////////////////////////////////////////////////////// std::string Date::dayName (int dow) { - static char* days[7] = + static const char* days[7] = { "Sunday", "Monday", diff --git a/src/TDB.cpp b/src/TDB.cpp index 071b4f101..b2efec264 100644 --- a/src/TDB.cpp +++ b/src/TDB.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include "task.h" #include "TDB.h" diff --git a/src/Table.cpp b/src/Table.cpp index 267139a1d..703e3bd8a 100644 --- a/src/Table.cpp +++ b/src/Table.cpp @@ -22,6 +22,7 @@ // //////////////////////////////////////////////////////////////////////////////// #include +#include #include #include #include diff --git a/src/parse.cpp b/src/parse.cpp index 13f0232cd..ca239f514 100644 --- a/src/parse.cpp +++ b/src/parse.cpp @@ -4,6 +4,7 @@ // //////////////////////////////////////////////////////////////////////////////// #include +#include #include #include #include @@ -13,7 +14,7 @@ #include "T.h" //////////////////////////////////////////////////////////////////////////////// -static char* colors[] = +static const char* colors[] = { "bold", "underline", @@ -75,7 +76,7 @@ static char* colors[] = "", }; -static char* attributes[] = +static const char* attributes[] = { "project", "priority", @@ -88,7 +89,7 @@ static char* attributes[] = "", }; -static char* commands[] = +static const char* commands[] = { "active", "add", @@ -115,7 +116,7 @@ static char* commands[] = "", }; -void guess (const std::string& type, char** list, std::string& candidate) +void guess (const std::string& type, const char** list, std::string& candidate) { std::vector options; for (int i = 0; list[i][0]; ++i) diff --git a/src/rules.cpp b/src/rules.cpp index bd14f7fbd..b297acb93 100644 --- a/src/rules.cpp +++ b/src/rules.cpp @@ -4,6 +4,7 @@ // //////////////////////////////////////////////////////////////////////////////// #include +#include #include "Config.h" #include "Table.h" #include "Date.h" diff --git a/src/task.cpp b/src/task.cpp index 22cd69b18..12bdf31dd 100644 --- a/src/task.cpp +++ b/src/task.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -1694,7 +1695,7 @@ void handleReportHistory (const TDB& tdb, T& task, Config& conf) table.setColumnJustification (4, Table::right); table.setColumnJustification (5, Table::right); - char *months[] = + const char *months[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", diff --git a/src/util.cpp b/src/util.cpp index ff2a4686d..0d5271ba3 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include "Table.h" #include "task.h" #include "../auto.h"