Windows compiling warnings that might prove interesting to check #2

Issue #262 new
Gaaned92 created an issue

First warning

In file included from D:/ART/ARTSOURCE/ART/rtengine/rtengine.h:39,
from D:/ART/ARTSOURCE/ART/rtengine/improccoordinator.h:22,
from D:/ART/ARTSOURCE/ART/rtengine/improccoordinator.cc:19:
In member function 'void rtengine::array2D<T>::fill(T) [with T = int]',
inlined from 'rtengine::array2D<T>::array2D(int, int, unsigned int) [with T = int]' at D:/ART/ARTSOURCE/ART/rtengine/array2D.h:199:17,
inlined from 'rtengine::ImProcCoordinator::ImProcCoordinator()' at D:/ART/ARTSOURCE/ART/rtengine/improccoordinator.cc:108:5:
D:/ART/ARTSOURCE/ART/rtengine/array2D.h:227:36: warning: array subscript 0 is outside array bounds of 'void [0]' [-Warray-bounds]
227 | std::fill(ptr_[i], ptr_[i]+width_, val);
| ^
In constructor 'rtengine::array2D<T>::array2D(int, int, unsigned int) [with T = int]',
inlined from 'rtengine::ImProcCoordinator::ImProcCoordinator()' at D:/ART/ARTSOURCE/ART/rtengine/improccoordinator.cc:108:5:
D:/ART/ARTSOURCE/ART/rtengine/array2D.h:190:16: note: object of size 0 allocated by 'operator new []'
190 | ptr_ = new T*[h];
| ^~~~~
In member function 'void rtengine::array2D<T>::fill(T) [with T = int]',
inlined from 'rtengine::array2D<T>::array2D(int, int, unsigned int) [with T = int]' at D:/ART/ARTSOURCE/ART/rtengine/array2D.h:199:17,
inlined from 'rtengine::ImProcCoordinator::ImProcCoordinator()' at D:/ART/ARTSOURCE/ART/rtengine/improccoordinator.cc:109:5:
D:/ART/ARTSOURCE/ART/rtengine/array2D.h:227:36: warning: array subscript 0 is outside array bounds of 'void [0]' [-Warray-bounds]
227 | std::fill(ptr_[i], ptr_[i]+width_, val);
| ^
In constructor 'rtengine::array2D<T>::array2D(int, int, unsigned int) [with T = int]',
inlined from 'rtengine::ImProcCoordinator::ImProcCoordinator()' at D:/ART/ARTSOURCE/ART/rtengine/improccoordinator.cc:109:5:
D:/ART/ARTSOURCE/ART/rtengine/array2D.h:190:16: note: object of size 0 allocated by 'operator new []'
190 | ptr_ = new T*[h];
| ^~~~~
In member function 'void rtengine::array2D<T>::fill(T) [with T = int]',
inlined from 'rtengine::array2D<T>::array2D(int, int, unsigned int) [with T = int]' at D:/ART/ARTSOURCE/ART/rtengine/array2D.h:199:17,
inlined from 'rtengine::ImProcCoordinator::ImProcCoordinator()' at D:/ART/ARTSOURCE/ART/rtengine/improccoordinator.cc:110:5:
D:/ART/ARTSOURCE/ART/rtengine/array2D.h:227:36: warning: array subscript 0 is outside array bounds of 'void [0]' [-Warray-bounds]
227 | std::fill(ptr_[i], ptr_[i]+width_, val);
| ^
In constructor 'rtengine::array2D<T>::array2D(int, int, unsigned int) [with T = int]',
inlined from 'rtengine::ImProcCoordinator::ImProcCoordinator()' at D:/ART/ARTSOURCE/ART/rtengine/improccoordinator.cc:110:5:
D:/ART/ARTSOURCE/ART/rtengine/array2D.h:190:16: note: object of size 0 allocated by 'operator new []'
190 | ptr_ = new T*[h];
| ^~~~~
In member function 'void rtengine::array2D<T>::fill(T) [with T = int]',
inlined from 'rtengine::array2D<T>::array2D(int, int, unsigned int) [with T = int]' at D:/ART/ARTSOURCE/ART/rtengine/array2D.h:199:17,
inlined from 'rtengine::ImProcCoordinator::ImProcCoordinator()' at D:/ART/ARTSOURCE/ART/rtengine/improccoordinator.cc:111:5:
D:/ART/ARTSOURCE/ART/rtengine/array2D.h:227:36: warning: array subscript 0 is outside array bounds of 'void [0]' [-Warray-bounds]
227 | std::fill(ptr_[i], ptr_[i]+width_, val);
| ~~~~^
In constructor 'rtengine::array2D<T>::array2D(int, int, unsigned int) [with T = int]',
inlined from 'rtengine::ImProcCoordinator::ImProcCoordinator()' at D:/ART/ARTSOURCE/ART/rtengine/improccoordinator.cc:111:5:
D:/ART/ARTSOURCE/ART/rtengine/array2D.h:190:16: note: object of size 0 allocated by 'operator new []'
190 | ptr_ = new T*[h];

Second warning

In file included from D:/ART/ARTSOURCE/ART/rtengine/rtengine.h:39,
from D:/ART/ARTSOURCE/ART/rtengine/rawimagesource.cc:22:
In member function 'void rtengine::array2D<T>::fill(T) [with T = float]',
inlined from 'rtengine::array2D<T>::array2D(int, int, unsigned int) [with T = float]' at D:/ART/ARTSOURCE/ART/rtengine/array2D.h:199:17,
inlined from 'rtengine::RawImageSource::RawImageSource()' at D:/ART/ARTSOURCE/ART/rtengine/rawimagesource.cc:618:7:
D:/ART/ARTSOURCE/ART/rtengine/array2D.h:227:36: warning: array subscript 0 is outside array bounds of 'void [0]' [-Warray-bounds]
227 | std::fill(ptr_[i], ptr_[i]+width_, val);
| ^
In constructor 'rtengine::array2D<T>::array2D(int, int, unsigned int) [with T = float]',
inlined from 'rtengine::RawImageSource::RawImageSource()' at D:/ART/ARTSOURCE/ART/rtengine/rawimagesource.cc:618:7:
D:/ART/ARTSOURCE/ART/rtengine/array2D.h:190:16: note: object of size 0 allocated by 'operator new []'
190 | ptr_ = new T*[h];
| ^~~~~
In member function 'void rtengine::array2D<T>::fill(T) [with T = float]',
inlined from 'rtengine::array2D<T>::array2D(int, int, unsigned int) [with T = float]' at D:/ART/ARTSOURCE/ART/rtengine/array2D.h:199:17,
inlined from 'rtengine::RawImageSource::RawImageSource()' at D:/ART/ARTSOURCE/ART/rtengine/rawimagesource.cc:619:7:
D:/ART/ARTSOURCE/ART/rtengine/array2D.h:227:36: warning: array subscript 0 is outside array bounds of 'void [0]' [-Warray-bounds]
227 | std::fill(ptr_[i], ptr_[i]+width_, val);
| ^
In constructor 'rtengine::array2D<T>::array2D(int, int, unsigned int) [with T = float]',
inlined from 'rtengine::RawImageSource::RawImageSource()' at D:/ART/ARTSOURCE/ART/rtengine/rawimagesource.cc:619:7:
D:/ART/ARTSOURCE/ART/rtengine/array2D.h:190:16: note: object of size 0 allocated by 'operator new []'
190 | ptr_ = new T*[h];
| ^~~~~
In member function 'void rtengine::array2D<T>::fill(T) [with T = float]',
inlined from 'rtengine::array2D<T>::array2D(int, int, unsigned int) [with T = float]' at D:/ART/ARTSOURCE/ART/rtengine/array2D.h:199:17,
inlined from 'rtengine::RawImageSource::RawImageSource()' at D:/ART/ARTSOURCE/ART/rtengine/rawimagesource.cc:620:7:
D:/ART/ARTSOURCE/ART/rtengine/array2D.h:227:36: warning: array subscript 0 is outside array bounds of 'void [0]' [-Warray-bounds]
227 | std::fill(ptr_[i], ptr_[i]+width_, val);
| ^
In constructor 'rtengine::array2D<T>::array2D(int, int, unsigned int) [with T = float]',
inlined from 'rtengine::RawImageSource::RawImageSource()' at D:/ART/ARTSOURCE/ART/rtengine/rawimagesource.cc:620:7:
D:/ART/ARTSOURCE/ART/rtengine/array2D.h:190:16: note: object of size 0 allocated by 'operator new []'
190 | ptr_ = new T*[h];
| ^~~~~
In member function 'void rtengine::array2D<T>::fill(T) [with T = float]',
inlined from 'rtengine::array2D<T>::array2D(int, int, unsigned int) [with T = float]' at D:/ART/ARTSOURCE/ART/rtengine/array2D.h:199:17,
inlined from 'rtengine::RawImageSource::RawImageSource()' at D:/ART/ARTSOURCE/ART/rtengine/rawimagesource.cc:621:7:
D:/ART/ARTSOURCE/ART/rtengine/array2D.h:227:36: warning: array subscript 0 is outside array bounds of 'void [0]' [-Warray-bounds]
227 | std::fill(ptr_[i], ptr_[i]+width_, val);
| ^
In constructor 'rtengine::array2D<T>::array2D(int, int, unsigned int) [with T = float]',
inlined from 'rtengine::RawImageSource::RawImageSource()' at D:/ART/ARTSOURCE/ART/rtengine/rawimagesource.cc:621:7:
D:/ART/ARTSOURCE/ART/rtengine/array2D.h:190:16: note: object of size 0 allocated by 'operator new []'
190 | ptr_ = new T*[h];
| ^~~~~

Version: 1.15-60-g2395edb1a
Branch: master
Commit: 2395edb1a
Commit date: 2022-08-25
Compiler: gcc 12.1.0
Processor: generic
System: Windows
Bit depth: 64 bits
Gtkmm: 3.24.6
Lensfun: 0.3.95.0
Exiv2: 0.27.5
LCMS2: 2.13
LibRaw: 0.21.0
OpenColorIO: 2.2.0
Build type: release
Build flags: -fno-tree-loop-vectorize -std=c++11 -fno-tree-loop-vectorize -mtune=generic -Werror=unused-label -fno-math-errno -Wl,--stack,4194304 -Wall -Wuninitialized -Wno-deprecated-declarations -Wno-unused-result -fopenmp -Werror=unknown-pragmas -Wno-aggressive-loop-optimizations -DNDEBUG -O3 -ftree-vectorize
Link flags: -mtune=generic -s -O3
OpenMP support: ON
Mi-malloc: V1.7
Build OS: Windows
Build date: 2022-08-25T13:52:16Z

Comments (0)

  1. Log in to comment