msvcp90/msvcp90.h: right-hand operand of comma expression has no effect

Gerald Pfeifer gerald at pfeifer.com
Tue Apr 15 16:48:00 CDT 2014


Building git head with GCC development sources (soon to be GCC 4.9.0)
gives me the following warnings

../msvcp90/msvcp90.h:529:75: warning: right-hand operand of comma expression has no effect [-Wunused-value]
../msvcp90/msvcp90.h:530:77: warning: right-hand operand of comma expression has no effect [-Wunused-value]

several times.

Digging into this in more detail I see

  ../msvcp90/ios.c: In function 'basic_streambuf_char__Xsgetn_s':
  ../msvcp90/msvcp90.h:529:75: warning: right-hand operand of comma expression
  has no effect [-Wunused-value]
  #define memcpy_s( dst, size, src, count ) (memcpy( (dst), (src), (count) ), 0)
                                                                            ^
  ../msvcp90/ios.c:1218:13: note: in expansion of macro 'memcpy_s'
             memcpy_s(ptr+copied, size, *this->prpos, chunk);
             ^

Someone must have written that code intentionally, so I am wondering
how to best address this.

Gerald



More information about the wine-devel mailing list