mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Build: Resolve some more compiler warnings
This commit is contained in:
parent
73f4f55e0a
commit
690d9493f0
7 changed files with 3 additions and 37 deletions
|
@ -349,7 +349,6 @@ void CLI::initialize (int argc, const char** argv)
|
||||||
_terminated = false;
|
_terminated = false;
|
||||||
|
|
||||||
_original_args.push_back (argv[0]);
|
_original_args.push_back (argv[0]);
|
||||||
bool terminated = false;
|
|
||||||
for (int i = 1; i < argc; ++i)
|
for (int i = 1; i < argc; ++i)
|
||||||
{
|
{
|
||||||
if (isTerminator (argv[i]))
|
if (isTerminator (argv[i]))
|
||||||
|
@ -1384,8 +1383,6 @@ void CLI::findIDs ()
|
||||||
{
|
{
|
||||||
if (a->hasTag ("FILTER"))
|
if (a->hasTag ("FILTER"))
|
||||||
{
|
{
|
||||||
bool found = false;
|
|
||||||
|
|
||||||
// IDs have a limited character set.
|
// IDs have a limited character set.
|
||||||
std::string raw = a->attribute ("raw");
|
std::string raw = a->attribute ("raw");
|
||||||
if (raw.find_first_not_of ("0123456789,-") == std::string::npos)
|
if (raw.find_first_not_of ("0123456789,-") == std::string::npos)
|
||||||
|
|
|
@ -65,33 +65,6 @@ static const char* modifierNames[] =
|
||||||
|
|
||||||
#define NUM_MODIFIER_NAMES (sizeof (modifierNames) / sizeof (modifierNames[0]))
|
#define NUM_MODIFIER_NAMES (sizeof (modifierNames) / sizeof (modifierNames[0]))
|
||||||
|
|
||||||
static const char* attributeNames[] =
|
|
||||||
{
|
|
||||||
"depends",
|
|
||||||
"description",
|
|
||||||
"due",
|
|
||||||
"end",
|
|
||||||
"entry",
|
|
||||||
"id",
|
|
||||||
"imask",
|
|
||||||
"mask",
|
|
||||||
"modified",
|
|
||||||
"parent",
|
|
||||||
"priority",
|
|
||||||
"project",
|
|
||||||
"recur",
|
|
||||||
"scheduled",
|
|
||||||
"start",
|
|
||||||
"status",
|
|
||||||
"tags",
|
|
||||||
"until",
|
|
||||||
"urgency",
|
|
||||||
"uuid",
|
|
||||||
"wait"
|
|
||||||
};
|
|
||||||
|
|
||||||
#define NUM_ATTRIBUTE_NAMES (sizeof (attributeNames) / sizeof (attributeNames[0]))
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
Context::Context ()
|
Context::Context ()
|
||||||
: rc_file ("~/.taskrc")
|
: rc_file ("~/.taskrc")
|
||||||
|
|
|
@ -319,7 +319,6 @@ bool Duration::parse (const std::string& input, std::string::size_type& start)
|
||||||
start = original_start + n.cursor ();
|
start = original_start + n.cursor ();
|
||||||
|
|
||||||
// Linear lookup - should be logarithmic.
|
// Linear lookup - should be logarithmic.
|
||||||
double seconds = 1;
|
|
||||||
for (unsigned int i = 0; i < NUM_DURATIONS; i++)
|
for (unsigned int i = 0; i < NUM_DURATIONS; i++)
|
||||||
{
|
{
|
||||||
if (durations[i].unit == unit &&
|
if (durations[i].unit == unit &&
|
||||||
|
|
|
@ -163,7 +163,6 @@ int CmdConfig::execute (std::string& output)
|
||||||
if (words.size ())
|
if (words.size ())
|
||||||
{
|
{
|
||||||
bool confirmation = context.config.getBoolean ("confirmation");
|
bool confirmation = context.config.getBoolean ("confirmation");
|
||||||
bool change = false;
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
std::string name = words[0];
|
std::string name = words[0];
|
||||||
|
|
|
@ -39,8 +39,6 @@
|
||||||
|
|
||||||
extern Context context;
|
extern Context context;
|
||||||
|
|
||||||
static const float epsilon = 0.000001;
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
CmdInfo::CmdInfo ()
|
CmdInfo::CmdInfo ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -113,7 +113,7 @@ int main (int argc, char** argv)
|
||||||
unsetenv ("TASKRC");
|
unsetenv ("TASKRC");
|
||||||
|
|
||||||
// Positive tests.
|
// Positive tests.
|
||||||
for (int i = 0; i < NUM_POSITIVE_TESTS; ++i)
|
for (unsigned int i = 0; i < NUM_POSITIVE_TESTS; ++i)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -131,7 +131,7 @@ int main (int argc, char** argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Negative tests.
|
// Negative tests.
|
||||||
for (int i = 0; i < NUM_NEGATIVE_TESTS; ++i)
|
for (unsigned int i = 0; i < NUM_NEGATIVE_TESTS; ++i)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -377,7 +377,7 @@ int main (int argc, char** argv)
|
||||||
};
|
};
|
||||||
#define NUM_TESTS (sizeof (lexerTests) / sizeof (lexerTests[0]))
|
#define NUM_TESTS (sizeof (lexerTests) / sizeof (lexerTests[0]))
|
||||||
|
|
||||||
for (int i = 0; i < NUM_TESTS; i++)
|
for (unsigned int i = 0; i < NUM_TESTS; i++)
|
||||||
{
|
{
|
||||||
// The isolated test puts the input string directly into the Lexer.
|
// The isolated test puts the input string directly into the Lexer.
|
||||||
Lexer isolated (lexerTests[i].input);
|
Lexer isolated (lexerTests[i].input);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue