msys2 / msys2-runtime

Our friendly fork of Cygwin 💖 https://cygwin.org 💖 see the wiki for details
https://github.com/msys2/msys2-runtime/wiki
GNU General Public License v2.0
185 stars 39 forks source link

build failure after update to msys2-w32api #214

Closed jeremyd2019 closed 6 months ago

jeremyd2019 commented 6 months ago

After msys2-w32api was updated to 11.0.1.r750.g05598db99-1 I am seeing a build failure in msys2-runtime:

  /C/_/msys2-runtime/src/msys2-runtime/winsup/cygwin/exceptions.cc: In member function 'int _cygtls::call_signal_handler()':
  /C/_/msys2-runtime/src/msys2-runtime/winsup/cygwin/exceptions.cc:1736:33: error: '<anonymous>' may be used uninitialized [-Werror=maybe-uninitialized]
   1736 |               RtlCaptureContext ((PCONTEXT) &context.uc_mcontext);
        |               ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lazka commented 6 months ago

Yeah, thanks, I saw that too locally, I guess we should add -Wno-error=maybe-uninitialized

https://github.com/msys2/msys2-runtime/blob/abcb3c6c0f330ac7568956b2be6bf3376517bb56/winsup/cygwin/exceptions.cc#L1736

edit: https://github.com/mingw-w64/mingw-w64/commit/e98e24be8cdb53a1a9e8026b348d33f820a322f6

lazka commented 6 months ago

I've created #215

jeremyd2019 commented 6 months ago

I really don't understand what it is that it is trying to warn about there. It doesn't look like the CONTEXT struct changed, but RtlCaptureContext got a new __attribute__((__returns_twice__))

jeremyd2019 commented 5 months ago

I was just attempting to build upstream cygwin on cygwin using latest non-test versions of cygwin packages, and got this same warning-as-error. So maybe upstream will do something about this one.

jeremyd2019 commented 4 months ago

7e3c833592b282355a57dd34459b152e4e078d19