Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
0981-wx-Add-define-to-silence-macro-deprecation...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0981-wx-Add-define-to-silence-macro-deprecation-warnings.patch of Package erlang
From 29b4b1ddff820840b10aac5e3a527c491bae1b31 Mon Sep 17 00:00:00 2001 From: Lukas Larsson <lukas@erlang.org> Date: Tue, 20 Feb 2024 09:14:26 +0100 Subject: [PATCH 1/6] wx: Add define to silence macro deprecation warnings Since we run -Werror in some builds, we need to be able to silence these types of warnings, but the WX project has not added a way to do that for these types of macro deprecations. So we add a way to re-define the wx deprecations macro to not emit any warning. --- lib/wx/api_gen/wx_gen_nif.erl | 6 ++++++ lib/wx/c_src/gen/wxe_macros.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/lib/wx/api_gen/wx_gen_nif.erl b/lib/wx/api_gen/wx_gen_nif.erl index e768f483fe..3420e28280 100644 --- a/lib/wx/api_gen/wx_gen_nif.erl +++ b/lib/wx/api_gen/wx_gen_nif.erl @@ -1469,6 +1469,12 @@ gen_macros() -> w(" #define wxICON_DEFAULT_BITMAP_TYPE wxBITMAP_TYPE_ICO_RESOURCE~n",[]), w("#endif~n", []), + w("~n~n", []), + w("#if defined(wxSTC_DISABLE_MACRO_DEPRECATIONS) && defined(wxSTC_DEPRECATED_MACRO_VALUE)~n",[]), + w("#undef wxSTC_DEPRECATED_MACRO_VALUE~n",[]), + w("#define wxSTC_DEPRECATED_MACRO_VALUE(value, msg) value~n",[]), + w("#endif~n",[]), + %% [w("#define ~s_~s ~p~n", [Class,Name,Id]) || %% {Class,Name,_,Id} <- wx_gen_erl:get_unique_names()], %% w("~n~n"). diff --git a/lib/wx/c_src/gen/wxe_macros.h b/lib/wx/c_src/gen/wxe_macros.h index 0d514a1709..8acf538cca 100644 --- a/lib/wx/c_src/gen/wxe_macros.h +++ b/lib/wx/c_src/gen/wxe_macros.h @@ -81,3 +81,9 @@ #ifndef wxICON_DEFAULT_BITMAP_TYPE #define wxICON_DEFAULT_BITMAP_TYPE wxBITMAP_TYPE_ICO_RESOURCE #endif + + +#if defined(wxSTC_DISABLE_MACRO_DEPRECATIONS) && defined(wxSTC_DEPRECATED_MACRO_VALUE) +#undef wxSTC_DEPRECATED_MACRO_VALUE +#define wxSTC_DEPRECATED_MACRO_VALUE(value, msg) value +#endif -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor