vimpunk / mio

Cross-platform C++11 header-only library for memory mapped file IO
MIT License
1.71k stars 157 forks source link

Default initialise is_handle_internal_ #93

Open Bidski opened 2 years ago

Bidski commented 2 years ago

gcc12 flags is_handle_internal_ as maybe being uninitialised. This PR adds a default initialisation for is_handle_internal_ to avoid this.

/usr/local/include/mio/detail/mmap.ipp:419:8: warning: '<anonymous>.mio::basic_mmap<mio::access_mode::write, char>::is_handle_internal_' may be used uninitialized [-Wmaybe-uninitialized]
  419 |     if(is_handle_internal_)
      |        ^~~~~~~~~~~~~~~~~~~