+2024-04-26 Bruno Haible <bruno@clisp.org>
+
+ login_tty tests: Avoid gcc warnings.
+ * tests/test-login_tty.c: Include ignore-value.h.
+ (main): Ignore the results of the freopen calls.
+ * modules/login_tty-tests (Depends-on): Add ignore-value.
+
2024-04-24 Paul Eggert <eggert@cs.ucla.edu>
c32srtombs,mbsrtoc32s,mbsrtowcs,wcsrtombs: pacify GCC 14
/* Test of login_tty() function.
- Copyright (C) 2010-2023 Free Software Foundation, Inc.
+ Copyright (C) 2010-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <termios.h>
#include <unistd.h>
+#include "ignore-value.h"
+
int
main ()
{
for (fd = 0; fd < 3; fd++)
if (!(tcgetpgrp (fd) == getpid ()))
{
- freopen ("err", "w+", stderr);
+ ignore_value (freopen ("err", "w+", stderr));
fprintf (stderr, "tcgetpgrp(%d) = %ld whereas getpid() = %ld\n",
fd, (long) tcgetpgrp (fd), (long) getpid ());
fflush (stderr);
{
if (!(errno == ENOSYS))
{
- freopen ("err", "w+", stderr);
+ ignore_value (freopen ("err", "w+", stderr));
fprintf (stderr, "tcgetsid(%d) = -1 and errno = %d\n",
fd, errno);
fflush (stderr);
{
if (!(sid == getpid ()))
{
- freopen ("err", "w+", stderr);
+ ignore_value (freopen ("err", "w+", stderr));
fprintf (stderr, "tcgetsid(%d) = %ld whereas getpid() = %ld\n",
fd, (long) tcgetsid (fd), (long) getpid ());
fflush (stderr);