Jeroen created ARROW-5849:
-----------------------------

             Summary: Compiler warnings on mingw-w64
                 Key: ARROW-5849
                 URL: https://issues.apache.org/jira/browse/ARROW-5849
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++
    Affects Versions: 0.14.0
            Reporter: Jeroen


In mingw64 we see the following warnings:

{code}
[ 54%] Building CXX object 
src/arrow/CMakeFiles/arrow_static.dir/util/io-util.cc.obj
C:/msys64/home/mingw-packages/mingw-w64-arrow/src/arrow/cpp/src/arrow/util/decimal.cc:
 In static member function 'static arrow::Status 
arrow::Decimal128::FromString(const string_view&, arrow::Decimal128*, int32_t*, 
int32_t*)':
C:/msys64/home/mingw-packages/mingw-w64-arrow/src/arrow/cpp/src/arrow/util/decimal.cc:313:35:
 warning: 'dec.arrow::{anonymous}::DecimalComponents::exponent' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
       *scale = -adjusted_exponent + len - 1;
                ~~~~~~~~~~~~~~~~~~~^~~~
{code} 

{code}
[ 56%] Building CXX object 
src/arrow/CMakeFiles/arrow_static.dir/util/string_builder.cc.obj
C:/msys64/home/mingw-packages/mingw-w64-arrow/src/arrow/cpp/src/arrow/util/io-util.cc:
 In static member function 'static arrow::Status 
arrow::internal::TemporaryDir::Make(const string&, 
std::unique_ptr<arrow::internal::TemporaryDir>*)':
C:/msys64/home/mingw-packages/mingw-w64-arrow/src/arrow/cpp/src/arrow/util/io-util.cc:897:3:
 warning: 'created' may be used uninitialized in this function 
[-Wmaybe-uninitialized]
   if (!created) {
   ^~
{code}

And on mingw32 we also see these:

{code}
[ 56%] Building CXX object 
src/arrow/CMakeFiles/arrow_static.dir/util/string_builder.cc.obj
C:/msys64/home/mingw-packages/mingw-w64-arrow/src/arrow/cpp/src/arrow/util/io-util.cc:
 In static member function 'static arrow::Status 
arrow::internal::TemporaryDir::Make(const string&, 
std::unique_ptr<arrow::internal::TemporaryDir>*)':
C:/msys64/home/mingw-packages/mingw-w64-arrow/src/arrow/cpp/src/arrow/util/io-util.cc:897:3:
 warning: 'created' may be used uninitialized in this function 
[-Wmaybe-uninitialized]
   if (!created) {
   ^~
{code}

{code}
 54%] Building CXX object 
src/arrow/CMakeFiles/arrow_static.dir/util/logging.cc.obj
In file included from 
C:/msys64/home/mingw-packages/mingw-w64-arrow/src/arrow/cpp/src/arrow/util/io-util.cc:63:
C:/msys64/home/mingw-packages/mingw-w64-arrow/src/arrow/cpp/src/arrow/io/mman.h:
 In function 'void* mmap(void*, size_t, int, int, int, off_t)':
C:/msys64/home/mingw-packages/mingw-w64-arrow/src/arrow/cpp/src/arrow/io/mman.h:94:62:
 warning: right shift count >= width of type [-Wshift-count-overflow]
   const DWORD dwMaxSizeHigh = static_cast<DWORD>((maxSize >> 32) & 
0xFFFFFFFFL);
                                                              ^~
C:/msys64/home/mingw-packages/mingw-w64-arrow/src/arrow/cpp/src/arrow/util/io-util.cc:
 In function 'arrow::Status arrow::internal::MemoryMapRemap(void*, size_t, 
size_t, int, void**)':
C:/msys64/home/mingw-packages/mingw-w64-arrow/src/arrow/cpp/src/arrow/util/io-util.cc:568:55:
 warning: right shift count >= width of type [-Wshift-count-overflow]
   LONG new_size_high = static_cast<LONG>((new_size >> 32) & 0xFFFFFFFFL);
                                 
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to