-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation warnings in release v0.3.6 #24
Comments
Hi @dgengin, Really exciting to see your latest work on DGEngine. I love the way that the new shadow handling looks like.
The sfeMovie and rapidjson warnings have indeed been fixed. The remaining warnings seem to be related to avcodec, the
Cheers! |
Thanks 😀. It looks like those calls were deprecated in FFmpeg 4. I was using v2, so I wasn't getting those. They will be fixed in the near future. |
Those should be fixed now (except for the warning of overloaded virtual in clang) |
Wonderful. Only two warnings remaining.
[ 35%] Building CXX object CMakeFiles/DGEngine.dir/src/Game/LevelMap.cpp.o
In file included from /home/u/Desktop/diablo/DGEngine/src/Game/stlastar.h:43,
from /home/u/Desktop/diablo/DGEngine/src/Game/PathFinder.h:4,
from /home/u/Desktop/diablo/DGEngine/src/Game/LevelMap.cpp:2:
/home/u/Desktop/diablo/DGEngine/src/Game/fsa.h: In instantiation of ‘FixedSizeAllocator<USER_TYPE>::FixedSizeAllocator(unsigned int) [with USER_TYPE = AStarSearch<MapSearchNode>::Node]’:
/home/u/Desktop/diablo/DGEngine/src/Game/stlastar.h:139:26: required from ‘AStarSearch<UserState>::AStarSearch(int) [with UserState = MapSearchNode]’
/home/u/Desktop/diablo/DGEngine/src/Game/PathFinder.h:16:75: required from ‘AStarMapSearch<T>::AStarMapSearch(const LevelMap*) [with T = MapSearchNode]’
/home/u/Desktop/diablo/DGEngine/src/Game/LevelMap.cpp:552:28: required from here
/home/u/Desktop/diablo/DGEngine/src/Game/fsa.h:87:9: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct FixedSizeAllocator<AStarSearch<MapSearchNode>::Node>::FSA_ELEMENT’; use assignment or value-initialization instead [-Wclass-memaccess]
87 | memset( m_pMemory, 0, sizeof( FSA_ELEMENT ) * m_MaxElements );
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/u/Desktop/diablo/DGEngine/src/Game/fsa.h:64:9: note: ‘struct FixedSizeAllocator<AStarSearch<MapSearchNode>::Node>::FSA_ELEMENT’ declared here
64 | struct FSA_ELEMENT
| ^~~~~~~~~~~ [ 99%] Building CXX object CMakeFiles/DGEngine.dir/src/ImageContainers/DT1ImageContainer.cpp.o
In file included from /usr/include/c++/9.1.0/cassert:44,
from /home/u/Desktop/diablo/DGEngine/./src/gsl/multi_span:26,
from /home/u/Desktop/diablo/DGEngine/./src/gsl/gsl:30,
from /home/u/Desktop/diablo/DGEngine/src/ImageContainers/DT1ImageContainer.cpp:4:
/home/u/Desktop/diablo/DGEngine/src/ImageContainers/DT1ImageContainer.cpp: In constructor ‘DT1ImageContainer::DT1ImageContainer(std::string_view)’:
/home/u/Desktop/diablo/DGEngine/src/ImageContainers/DT1ImageContainer.cpp:333:35: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘endian::detail::stream<const unsigned char*>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
333 | assert(tile.blockHeadersPointer == fileStream.position());
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/u/Desktop/diablo/DGEngine/src/ImageContainers/DT1ImageContainer.cpp:340:61: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘endian::detail::stream<const unsigned char*>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
340 | assert(tile.blockHeadersPointer + blockHeader.fileOffset == fileStream.position());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ |
No warnings in GCC and MSVC (I hope). some in Clang. I had to change the stlastar include so I ended up fixing the memset by using a vector instead. |
Two warnings using GCC 11.0 on Arch Linux, both related to deprecated API.
|
Happy to see the latest release. It compiles and runs just fine. However, there are a few warnings reported during compilation.
With GCC 8.3.0, the following warnings are reported during build:
The text was updated successfully, but these errors were encountered: