Skip to content

Commit

Permalink
Fix various -Werror build failures
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=256466

Unreviewed build fixes.

Fix unused variable warnings, plus placate Clang's overaggressive
-Wmissing-field-initializers in MiniBrowser.

* Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
* Tools/MiniBrowser/gtk/main.c:
(addSettingsGroupToContext):
* Tools/TestWebKitAPI/Tests/WebCore/FloatSizeTests.cpp:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/263801@main
  • Loading branch information
mcatanzaro committed May 8, 2023
1 parent 3163f4a commit d76f2c4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Expand Up @@ -124,8 +124,13 @@ class InternalSource final : public MediaStreamTrackPrivate::Observer,
: m_parent(parent)
, m_track(track)
, m_padName(padName)
#if USE(GSTREAMER_WEBRTC)
, m_consumerIsVideoPlayer(consumerIsVideoPlayer)
#endif
{
#if !USE(GSTREAMER_WEBRTC)
UNUSED_PARAM(consumerIsVideoPlayer);
#endif
static uint64_t audioCounter = 0;
static uint64_t videoCounter = 0;
String elementName;
Expand Down Expand Up @@ -536,7 +541,9 @@ class InternalSource final : public MediaStreamTrackPrivate::Observer,
Lock m_eosLock;
bool m_eosPending WTF_GUARDED_BY_LOCK(m_eosLock) { false };
std::optional<int> m_webrtcSourceClientId;
#if USE(GSTREAMER_WEBRTC)
bool m_consumerIsVideoPlayer { false };
#endif
};

struct _WebKitMediaStreamSrcPrivate {
Expand Down
3 changes: 2 additions & 1 deletion Tools/MiniBrowser/gtk/main.c
Expand Up @@ -384,8 +384,9 @@ static gboolean addSettingsGroupToContext(GOptionContext *context, WebKitSetting
.arg_data = parseFeaturesOptionCallback,
.arg_description = "FEATURE-LIST",
},
{ NULL }
{ }
};
memset(&featureEntries[1], 0, sizeof(GOptionEntry));
g_option_group_add_entries(webSettingsGroup, featureEntries);

/* Option context takes ownership of the group. */
Expand Down
2 changes: 1 addition & 1 deletion Tools/TestWebKitAPI/Tests/WebCore/FloatSizeTests.cpp
Expand Up @@ -190,9 +190,9 @@ TEST(FloatSize, TransposedSize)

TEST(FloatSize, Casting)
{
#if USE(CG)
WebCore::FloatSize test(1024.0f, 768.0f);

#if USE(CG)
CGSize cgSize = test;

EXPECT_FLOAT_EQ(1024.0f, cgSize.width);
Expand Down

0 comments on commit d76f2c4

Please sign in to comment.