Skip to content

Conversation

@kou
Copy link
Member

@kou kou commented Feb 25, 2019

We need to suppress all warnings for debug build.

Messages:

cpp/src/arrow/util/cpu-info.cc: In function 'bool arrow::internal::RetrieveCacheSize(int64_t*)':
cpp/src/arrow/util/cpu-info.cc:127:12: error: conversion from 'long long unsigned int' to 'DWORD' {aka 'long unsigned int'} may change value [-Werror=conversion]
     offset += sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cpp/src/arrow/util/cpu-info.cc: In function 'bool arrow::internal::RetrieveCPUInfo(int64_t*, std::__cxx11::string*)':
cpp/src/arrow/util/cpu-info.cc:159:33: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
   if (highest_extended_valid_id >= 0x80000004) {
       ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
cpp/src/arrow/util/cpu-info.cc:161:32: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
     for (int i = 0x80000002; i <= 0x80000004; ++i) {
                              ~~^~~~~~~~~~~~~
cpp/src/arrow/util/cpu-info.cc: At global scope:
cpp/src/arrow/util/cpu-info.cc:77:9: warning: 'int64_t arrow::internal::{anonymous}::ParseCPUFlags(const string&)' defined but not used [-Wunused-function]
 int64_t ParseCPUFlags(const std::string& values) {
         ^~~~~~~~~~~~~

cpp/src/arrow/util/io-util.cc: In function 'arrow::Status arrow::internal::FileRead(int, uint8_t*, int64_t, int64_t*)':
cpp/src/arrow/util/io-util.cc:408:57: error: conversion from 'size_t' {aka 'long long unsigned int'} to 'unsigned int' may change value [-Werror=conversion]
     int64_t ret = static_cast<int64_t>(read(fd, buffer, static_cast<size_t>(chunksize)));
                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cpp/src/arrow/util/io-util.cc: In function 'arrow::Status arrow::internal::FileWrite(int, const uint8_t*, int64_t)':
cpp/src/arrow/util/io-util.cc:476:43: [ error: 75conversion from '%  size_tBuilding CXX object src/arrow/CMakeFiles/arrow_objlib.dir/util/memory.cc.obj' {aka '
long long unsigned int'} to 'unsigned int' may change value [-Werror=conversion]
         write(fd, buffer + bytes_written, static_cast<size_t>(chunksize)));
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@kou kou force-pushed the cpp-add-support-debug-build-with-mingw branch from 37ee419 to 4b69afd Compare February 25, 2019 21:28
We need to suppress all warnings for debug build.

Messages:

    cpp/src/arrow/util/cpu-info.cc: In function 'bool arrow::internal::RetrieveCacheSize(int64_t*)':
    cpp/src/arrow/util/cpu-info.cc:127:12: error: conversion from 'long long unsigned int' to 'DWORD' {aka 'long unsigned int'} may change value [-Werror=conversion]
         offset += sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION);
         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cpp/src/arrow/util/cpu-info.cc: In function 'bool arrow::internal::RetrieveCPUInfo(int64_t*, std::__cxx11::string*)':
    cpp/src/arrow/util/cpu-info.cc:159:33: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
       if (highest_extended_valid_id >= 0x80000004) {
           ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
    cpp/src/arrow/util/cpu-info.cc:161:32: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
         for (int i = 0x80000002; i <= 0x80000004; ++i) {
                                  ~~^~~~~~~~~~~~~
    cpp/src/arrow/util/cpu-info.cc: At global scope:
    cpp/src/arrow/util/cpu-info.cc:77:9: warning: 'int64_t arrow::internal::{anonymous}::ParseCPUFlags(const string&)' defined but not used [-Wunused-function]
     int64_t ParseCPUFlags(const std::string& values) {
             ^~~~~~~~~~~~~

    cpp/src/arrow/util/io-util.cc: In function 'arrow::Status arrow::internal::FileRead(int, uint8_t*, int64_t, int64_t*)':
    cpp/src/arrow/util/io-util.cc:408:57: error: conversion from 'size_t' {aka 'long long unsigned int'} to 'unsigned int' may change value [-Werror=conversion]
         int64_t ret = static_cast<int64_t>(read(fd, buffer, static_cast<size_t>(chunksize)));
                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cpp/src/arrow/util/io-util.cc: In function 'arrow::Status arrow::internal::FileWrite(int, const uint8_t*, int64_t)':
    cpp/src/arrow/util/io-util.cc:476:43: [ error: 75conversion from '%  size_tBuilding CXX object src/arrow/CMakeFiles/arrow_objlib.dir/util/memory.cc.obj' {aka '
    long long unsigned int'} to 'unsigned int' may change value [-Werror=conversion]
             write(fd, buffer + bytes_written, static_cast<size_t>(chunksize)));
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@kou kou force-pushed the cpp-add-support-debug-build-with-mingw branch from 4b69afd to 4dc7fc7 Compare February 26, 2019 23:44
@codecov-io
Copy link

Codecov Report

Merging #3750 into master will decrease coverage by 0.18%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #3750      +/-   ##
=========================================
- Coverage   87.78%   87.6%   -0.19%     
=========================================
  Files         607     707     +100     
  Lines       66049   86486   +20437     
  Branches     1227    1227              
=========================================
+ Hits        57982   75764   +17782     
- Misses       7954   10609    +2655     
  Partials      113     113
Impacted Files Coverage Δ
cpp/src/arrow/util/cpu-info.cc 75% <ø> (ø) ⬆️
cpp/src/arrow/util/io-util.cc 81.56% <ø> (ø) ⬆️
cpp/src/arrow/compute/kernels/sum.cc 72.99% <0%> (-19.6%) ⬇️
cpp/src/arrow/util/bit-util.h 95.62% <0%> (-4.38%) ⬇️
cpp/src/arrow/util/key_value_metadata.cc 98.59% <0%> (-1.41%) ⬇️
cpp/src/arrow/util/bpacking.h 99.84% <0%> (-0.01%) ⬇️
python/pyarrow/ipc.pxi 66.15% <0%> (ø)
python/pyarrow/tests/test_deprecations.py 100% <0%> (ø)
python/pyarrow/tests/test_plasma.py 96.51% <0%> (ø)
python/pyarrow/tests/pandas_examples.py 95.83% <0%> (ø)
... and 157 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6fb4cd0...4dc7fc7. Read the comment docs.

@kou
Copy link
Member Author

kou commented Mar 1, 2019

No objection.
I'll merge this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants