mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-17 23:08:40 +02:00
Suppress compile warnings on Ubuntu 18.04
This commit is contained in:
@@ -987,7 +987,7 @@ int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RUN_TYPE:
|
case RUN_TYPE:
|
||||||
system(DBufValue(&buf));
|
System(DBufValue(&buf));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* Unknown/illegal type? */
|
default: /* Unknown/illegal type? */
|
||||||
@@ -1257,7 +1257,7 @@ int DoMsgCommand(char const *cmd, char const *msg)
|
|||||||
}
|
}
|
||||||
r = OK;
|
r = OK;
|
||||||
|
|
||||||
system(DBufValue(&execBuffer));
|
System(DBufValue(&execBuffer));
|
||||||
|
|
||||||
finished:
|
finished:
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
|
|||||||
11
src/main.c
11
src/main.c
@@ -1392,3 +1392,14 @@ SaveLastTimeTrig(TimeTrig const *t)
|
|||||||
{
|
{
|
||||||
memcpy(&LastTimeTrig, t, sizeof(LastTimeTrig));
|
memcpy(&LastTimeTrig, t, sizeof(LastTimeTrig));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Wrapper to ignore warnings about ignoring return value of system() */
|
||||||
|
void
|
||||||
|
System(char const *cmd)
|
||||||
|
{
|
||||||
|
int r;
|
||||||
|
r = system(cmd);
|
||||||
|
if (r == 0) {
|
||||||
|
r = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -160,3 +160,4 @@ void PrintJSONKeyPairString(char const *name, char const *val);
|
|||||||
void PrintJSONKeyPairDate(char const *name, int jul);
|
void PrintJSONKeyPairDate(char const *name, int jul);
|
||||||
void PrintJSONKeyPairDateTime(char const *name, int dt);
|
void PrintJSONKeyPairDateTime(char const *name, int dt);
|
||||||
void PrintJSONKeyPairTime(char const *name, int t);
|
void PrintJSONKeyPairTime(char const *name, int t);
|
||||||
|
void System(char const *cmd);
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ void IssueSortedReminders(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RUN_TYPE:
|
case RUN_TYPE:
|
||||||
system(cur->text);
|
System(cur->text);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user