In file included from ../../tests/pthread_exit/exit2.c:41:
    ../../tests/pthread_exit/exit2.c: In function 'func':
    ../../tests/test.h:124:33: warning: right-hand operand of comma expression 
has no effect [-Wunused-value]
      120 |    ((e) ? ((ASSERT_TRACE) ? fprintf(stderr, \
          |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      121 |                                     "Assertion succeeded: (%s), 
file %s, line %d\n", \
          |                                     
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      122 |                                     #e, __FILE__, (int) __LINE__), \
          |                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      123 |                                     fflush(stderr) : \
          |                                     ~~~~~~~~~~~~~~~~~~
      124 |                              0) : \
          |                              ~~~^~~
      125 |           (fprintf(stderr, "Assertion failed: (%s), file %s, line 
%d\n", \
          |           
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      126 |                    #e, __FILE__, (int) __LINE__), exit(1), 0))
          |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../tests/pthread_exit/exit2.c:49:9: note: in expansion of macro 'assert'
       49 |         assert(0);
          |         ^~~~~~

Signed-off-by: Martin Storsjö <[email protected]>
---
 mingw-w64-libraries/winpthreads/tests/test.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mingw-w64-libraries/winpthreads/tests/test.h 
b/mingw-w64-libraries/winpthreads/tests/test.h
index 8b22d03f7..0be7196ef 100644
--- a/mingw-w64-libraries/winpthreads/tests/test.h
+++ b/mingw-w64-libraries/winpthreads/tests/test.h
@@ -123,7 +123,7 @@ const char * error_string[] = {
                                    fflush(stderr) : \
                              0) : \
           (fprintf(stderr, "Assertion failed: (%s), file %s, line %d\n", \
-                   #e, __FILE__, (int) __LINE__), exit(1), 0))
+                   #e, __FILE__, (int) __LINE__), exit(1)))
 
 int assertE;
 # define assert_e(e, o, r) \
@@ -133,7 +133,7 @@ int assertE;
                                    fflush(stderr) : \
                              0) : \
           (fprintf(stderr, "Assertion failed: (%s %s %s), file %s, line %d, 
error %s\n", \
-                   #e,#o,#r, __FILE__, (int) __LINE__, error_string[assertE]), 
exit(1), 0))
+                   #e,#o,#r, __FILE__, (int) __LINE__, error_string[assertE]), 
exit(1)))
 
 #ifndef PTW32_VERSION
 /* Extensions for winpthread to make more w32 tests happy (non posix): */
-- 
2.43.0



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to