fix(pinelog): Cleanup unused parameter warnings

With a recent enough version, the compiler reports a number of unused
parameter warnings when Meson is configured with `--warnlevel=3`. This
commit addresses those warnings.
fix-issue-63
nirenjan 2026-03-18 22:25:26 -07:00
parent b0b457d14e
commit 3c1abd57d5
3 changed files with 7 additions and 2 deletions

View File

@ -41,7 +41,7 @@ static void print_time_difference(const char *type, struct timespec *ts)
type, tp_usec, tp_nsec, ret.tv_sec, ret.tv_nsec);
}
int main(int argc, char **argv)
int main(void)
{
struct timespec ts_wall[2];
struct timespec ts_cpu[2];

View File

@ -348,6 +348,10 @@ void pinelog_log_message(int module, int level, const char *file, int line, cons
#else
fprintf(output_stream, "%s:%d ", file, line);
#endif
#else
// Suppress unused parameter warnings
(void)file;
(void)line;
#endif
/* Set the module name if it is not the root */

View File

@ -36,6 +36,7 @@ static size_t expected_len;
time_t time(time_t *p)
{
(void)p;
// Override the time function from libc
return 1636671600;
}
@ -196,7 +197,7 @@ static void tap_bailout(const char *msg)
exit(1);
}
int main(int argc, char **argv)
int main(void)
{
int fifo_fd[2];
int flags;