mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 06:18:47 +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;
|
||||
|
||||
case RUN_TYPE:
|
||||
system(DBufValue(&buf));
|
||||
System(DBufValue(&buf));
|
||||
break;
|
||||
|
||||
default: /* Unknown/illegal type? */
|
||||
@@ -1257,7 +1257,7 @@ int DoMsgCommand(char const *cmd, char const *msg)
|
||||
}
|
||||
r = OK;
|
||||
|
||||
system(DBufValue(&execBuffer));
|
||||
System(DBufValue(&execBuffer));
|
||||
|
||||
finished:
|
||||
DBufFree(&buf);
|
||||
|
||||
11
src/main.c
11
src/main.c
@@ -1392,3 +1392,14 @@ SaveLastTimeTrig(TimeTrig const *t)
|
||||
{
|
||||
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 PrintJSONKeyPairDateTime(char const *name, int dt);
|
||||
void PrintJSONKeyPairTime(char const *name, int t);
|
||||
void System(char const *cmd);
|
||||
|
||||
@@ -150,7 +150,7 @@ void IssueSortedReminders(void)
|
||||
break;
|
||||
|
||||
case RUN_TYPE:
|
||||
system(cur->text);
|
||||
System(cur->text);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user