You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coming GCC 11 introduced new warning, -Wmismatched-new-delete.
It complains a lot in OpenTTD code: (this is short excerpt, there's a lot more similiar warnings)
/home/milek7/ottd2/src/ai/ai_gui.cpp: In function ‘void ShowAIListWindow(CompanyID)’:
/home/milek7/ottd2/src/ai/ai_gui.cpp:280:46: warning: ‘static void Window::operator delete(void*)’ called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
280 | new AIListWindow(&_ai_list_desc, slot);
| ^
/home/milek7/ottd2/src/ai/ai_gui.cpp:280:46: note: returned from ‘static void* ZeroedMemoryAllocator::operator new(size_t)’
[ 58%] Building CXX object CMakeFiles/openttd.dir/src/blitter/40bpp_anim.cpp.o
/home/milek7/ottd2/src/ai/ai_gui.cpp: In function ‘void ShowAISettingsWindow(CompanyID)’:
/home/milek7/ottd2/src/ai/ai_gui.cpp:633:54: warning: ‘static void Window::operator delete(void*)’ called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
633 | new AISettingsWindow(&_ai_settings_desc, slot);
| ^
/home/milek7/ottd2/src/ai/ai_gui.cpp:633:54: note: returned from ‘static void* ZeroedMemoryAllocator::operator new(size_t)’
/home/milek7/ottd2/src/ai/ai_gui.cpp: In function ‘void ShowScriptTextfileWindow(TextfileType, CompanyID)’:
/home/milek7/ottd2/src/ai/ai_gui.cpp:673:49: warning: ‘static void Window::operator delete(void*)’ called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
673 | new ScriptTextfileWindow(file_type, slot);
| ^
/home/milek7/ottd2/src/ai/ai_gui.cpp:673:49: note: returned from ‘static void* ZeroedMemoryAllocator::operator new(size_t)’
/home/milek7/ottd2/src/ai/ai_gui.cpp: In function ‘void ShowAIConfigWindow()’:
/home/milek7/ottd2/src/ai/ai_gui.cpp:974:28: warning: ‘static void Window::operator delete(void*)’ called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
974 | new AIConfigWindow();
| ^
/home/milek7/ottd2/src/ai/ai_gui.cpp:974:28: note: returned from ‘static void* ZeroedMemoryAllocator::operator new(size_t)’
/home/milek7/ottd2/src/ai/ai_gui.cpp: In function ‘Window* ShowAIDebugWindow(CompanyID)’:
/home/milek7/ottd2/src/ai/ai_gui.cpp:1539:75: warning: ‘static void Window::operator delete(void*)’ called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
1539 | if (w == nullptr) w = new AIDebugWindow(&_ai_debug_desc, 0);
| ^
/home/milek7/ottd2/src/ai/ai_gui.cpp:1539:75: note: returned from ‘static void* ZeroedMemoryAllocator::operator new(size_t)’
The text was updated successfully, but these errors were encountered:
Coming GCC 11 introduced new warning,
-Wmismatched-new-delete
.It complains a lot in OpenTTD code: (this is short excerpt, there's a lot more similiar warnings)
The text was updated successfully, but these errors were encountered: