forked from WebPlatformForEmbedded/WPEWebKit
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WebRTC] Fix -Wunused-but-set-variable warnings in the libwebrtc project
https://bugs.webkit.org/show_bug.cgi?id=250622 <rdar://104261631> Reviewed by Youenn Fablet. * Source/ThirdParty/libwebrtc/Configurations/Base.xcconfig: (WK_FIXME_WARNING_CFLAGS): - Remove -Wno-unused-but-set-variable. * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_pps_parser.cc: - Add empty statements for bits_tmp and golomb_ignored variables. * Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_sps_parser.cc: - Add empty statement for golomb_ignored variable. * Source/ThirdParty/libwebrtc/WebKit/libwebrtc-fix-Wunused-but-set-variable.diff: Add. Canonical link: https://commits.webkit.org/258956@main
- Loading branch information
1 parent
b11c854
commit 523b2e6
Showing
3 changed files
with
32 additions
and
0 deletions.
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
27 changes: 27 additions & 0 deletions
27
Source/ThirdParty/libwebrtc/WebKit/libwebrtc-fix-Wunused-but-set-variable.diff
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,27 @@ | ||
diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_pps_parser.cc b/Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_pps_parser.cc | ||
index 6f13f3b807bb..1df2667d2eae 100644 | ||
--- a/Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_pps_parser.cc | ||
+++ b/Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_pps_parser.cc | ||
@@ -172,6 +172,10 @@ absl::optional<H265PpsParser::PpsState> H265PpsParser::ParseInternal( | ||
// redundant_pic_cnt_present_flag: u(1) | ||
pps.redundant_pic_cnt_present_flag = bit_buffer->ReadBits(1); | ||
|
||
+ // Ignore -Wunused-but-set-variable warnings. | ||
+ (void)bits_tmp; | ||
+ (void)golomb_ignored; | ||
+ | ||
return pps; | ||
} | ||
|
||
diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_sps_parser.cc b/Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_sps_parser.cc | ||
index f4628ad63eeb..0d157624f533 100644 | ||
--- a/Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_sps_parser.cc | ||
+++ b/Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h265/h265_sps_parser.cc | ||
@@ -128,6 +128,7 @@ absl::optional<H265SpsParser::SpsState> H265SpsParser::ParseSpsUpToVui(Bitstream | ||
} | ||
// sps_seq_parameter_set_id: ue(v) | ||
golomb_ignored = buffer->ReadExponentialGolomb(); | ||
+ (void)golomb_ignored; // Ignore -Wunused-but-set-variable warning. | ||
// chrome_format_idc: ue(v) | ||
chroma_format_idc = buffer->ReadExponentialGolomb(); | ||
if (chroma_format_idc == 3) { |