forked from mpv-player/mpv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meson: apply libplacebo patch to suppress some warnings
- Loading branch information
Showing
3 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
From a75d059fbe085709c840d16b2037b53d384d9dcc Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]> | ||
Date: Mon, 23 Oct 2023 14:59:19 +0200 | ||
Subject: [PATCH 1/2] log: suppress maybe-uninitialized warning false positive | ||
|
||
This will never be used uninitialized, guarded by use_dbghelp, but GCC | ||
analysis is too shallow and fails to see that. | ||
--- | ||
src/log.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/log.c b/src/log.c | ||
index d43f41749..0829dd3d3 100644 | ||
--- a/src/log.c | ||
+++ b/src/log.c | ||
@@ -281,7 +281,7 @@ void pl_log_stack_trace(pl_log log, enum pl_log_level lev) | ||
HANDLE process = GetCurrentProcess(); | ||
HMODULE dbghelp = LoadLibrary("dbghelp.dll"); | ||
DWORD options; | ||
- SYMBOL_INFO *symbol; | ||
+ SYMBOL_INFO *symbol = NULL; | ||
BOOL use_dbghelp = !!dbghelp; | ||
|
||
#define DBGHELP_SYM(sym) \ | ||
-- | ||
GitLab | ||
|
||
|
||
From 5c03d91ba5696c62b85bf37fefafca4733acf91a Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]> | ||
Date: Mon, 23 Oct 2023 15:02:06 +0200 | ||
Subject: [PATCH 2/2] shaders/custom: suppress -Werror=stringop-overflow= false | ||
positives | ||
|
||
GCC is confused... | ||
--- | ||
src/shaders/custom_mpv.c | 7 +++++++ | ||
1 file changed, 7 insertions(+) | ||
|
||
diff --git a/src/shaders/custom_mpv.c b/src/shaders/custom_mpv.c | ||
index 4ef08178b..b9f71720b 100644 | ||
--- a/src/shaders/custom_mpv.c | ||
+++ b/src/shaders/custom_mpv.c | ||
@@ -230,6 +230,10 @@ static bool parse_hook(pl_log log, pl_str *body, struct custom_shader_hook *out) | ||
continue; | ||
} | ||
|
||
+#if defined(__GNUC__) && !defined(__clang__) | ||
+# pragma GCC diagnostic push | ||
+# pragma GCC diagnostic ignored "-Wstringop-overflow=" | ||
+#endif | ||
if (pl_str_eatstart0(&line, "WIDTH")) { | ||
if (!parse_rpn_shexpr(line, out->width)) { | ||
pl_err(log, "Error while parsing WIDTH!"); | ||
@@ -253,6 +257,9 @@ static bool parse_hook(pl_log log, pl_str *body, struct custom_shader_hook *out) | ||
} | ||
continue; | ||
} | ||
+#if defined(__GNUC__) && !defined(__clang__) | ||
+# pragma GCC diagnostic pop | ||
+#endif | ||
|
||
if (pl_str_eatstart0(&line, "COMPONENTS")) { | ||
if (!pl_str_parse_int(pl_str_strip(line), &out->comps)) { | ||
-- | ||
GitLab | ||
|