-
assigned issue to
Warning in x265 code
Issue #534
new
There is one and only one warning throughout the build but it repeats many times.
In file included from /home/ports/pobj/x265-3.3/x265_3.3/source/encoder/ratecontrol.cpp:36:
In file included from /home/ports/pobj/x265-3.3/x265_3.3/source/encoder/encoder.h:30:
/home/ports/pobj/x265-3.3/x265_3.3/source/common/scalinglist.h:36:12: warning: declaration shadows a variable in namespace 'x265' [-Wshadow]
enum { NUM_SIZES = 4 }; // 4x4, 8x8, 16x16, 32x32
^
/home/ports/pobj/x265-3.3/x265_3.3/source/common/cudata.h:51:5: note: previous declaration is here
NUM_SIZES
^
1 warning generated.
Comments (4)
-
-
Hi . Can you share me the installed GCC version please ?
-
reporter OpenBSD uses Clang 8.
-
It is because of the same enum name used in the namespace
X265_NS
.In C++98 it could be solved by declaring all the variables as static const int
for eg:
static const int NUM_SIZES = 4 ;
If C++11 it could be solved by declaring it an enum class.
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Renum-unnamed
Enum.6: Avoid unnamed enumerations
- Log in to comment