projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
passfd test: Fix warnings.
[pspp]
/
tests
/
test-freopen-safer.c
diff --git
a/tests/test-freopen-safer.c
b/tests/test-freopen-safer.c
index 40ba8872d448b45574f4cf4c80a0f5f3ea39c45c..bcd32862bdcca4ab803b7332f4b635e6cb1df29e 100644
(file)
--- a/
tests/test-freopen-safer.c
+++ b/
tests/test-freopen-safer.c
@@
-1,5
+1,5
@@
/* Test of reopening a stream.
/* Test of reopening a stream.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009
-2011
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
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
@@
-22,7
+22,6
@@
#include "stdio--.h"
/* Helpers. */
#include "stdio--.h"
/* Helpers. */
-#include <stdlib.h>
#include <unistd.h>
/* This test intentionally closes stderr. So, we arrange to have fd 10
#include <unistd.h>
/* This test intentionally closes stderr. So, we arrange to have fd 10
@@
-30,19
+29,10
@@
duplicate the original stderr. */
#define BACKUP_STDERR_FILENO 10
duplicate the original stderr. */
#define BACKUP_STDERR_FILENO 10
-static FILE *myerr;
+#define ASSERT_STREAM myerr
+#include "macros.h"
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (myerr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (myerr); \
- abort (); \
- } \
- } \
- while (0)
+static FILE *myerr;
int
main (void)
int
main (void)