OSDN Git Service

Suppress expected header warnings when running testsuite.
authorKeith Marshall <keithmarshall@users.sourceforge.net>
Tue, 13 Sep 2016 20:14:13 +0000 (21:14 +0100)
committerKeith Marshall <keithmarshall@users.sourceforge.net>
Tue, 13 Sep 2016 20:14:13 +0000 (21:14 +0100)
mingwrt/ChangeLog
mingwrt/include/dir.h
mingwrt/include/dos.h

index 132e2f5..1ac848e 100644 (file)
@@ -1,5 +1,15 @@
 2016-09-13  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
+       Suppress expected header warnings when running testsuite.
+
+       * include/dir.h include/dos.h [__IN_MINGWRT_TESTSUITE__]: New feature
+       test; do not emit warning messages, which declare this pair of headers
+       to be obsolete.  These warnings are expected, but their format may not
+       be deterministically predictable; there is no reason to fail any test
+       on account of any such expected warning message.
+
+2016-09-13  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
        Create a preliminary autotest framework.
 
        * configure.ac (AC_TESTDIR): Initialize tests subdirectory.
index a5714a1..68322a5 100644 (file)
 #pragma GCC system_header
 #define _DIR_H
 
+/* Header <dir.h> is obsolete, and we would like to advise the user to
+ * use <io.h> instead; however...
+ */
+#ifndef __IN_MINGWRT_TESTSUITE__
+/* ...this warning will interfere with the testsuite result, so display
+ * it only in normal use, (i.e. suppress it when running the testsuite)...
+ */
 #warning "<dir.h> is obsolete; please use <io.h> instead."
+#endif
+/* ...always including the appropriate replacement header, regardless.
+ */
 #include "io.h"
 
 #endif /* !_DIR_H: $RCSfile$: end of file */
index 6d1435f..ec748e1 100644 (file)
   * that the user may have included <dos.h> directly.
   */
 #define        _DOS_H
+/* If the user does include <dos.h> directly, we should raise an alert
+ * to advise that <direct.h> is the preferred alternative; however, the
+ * warning will interfere with the testsuite result...
+ */
+#ifndef __IN_MINGWRT_TESTSUITE__
+/* ...so we suppress it in this specific instance.
+ */
 #warning "<dos.h> is obsolete; consider using <direct.h> instead."
+#endif
 #endif /* !__DIRECT_H_SOURCED__ */
 
 /* All MinGW headers are required to include <_mingw.h>; additionally,