summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2023-05-12 13:27:19 +0300
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2023-05-14 15:58:35 +0000
commitbb2c5981fe24e2c96acff32b572783e5794abe28 (patch)
treeb33c74f6deeb127f19d430f837ef98806ae8d89a
parentf9a3b3eacf9eead6a65e51e50b911e70f8496020 (diff)
downloadgstreamer-bb2c5981fe24e2c96acff32b572783e5794abe28.tar.gz
pulse: Change bitfield booleans to normal gbooleans
Assigning TRUE (1) to a signed 1 bit integer will cause truncation from 1 to -1 because the only non-zero value that can be stored is -1 due to how two's-complement works. As this is a proper GObject let's not bother with all this and simply use a normal gboolean instead. ../subprojects/gst-plugins-good/ext/pulse/pulsesink.c:1490:19: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] pbuf->in_commit = TRUE; ^ ~~~~ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4617>
-rw-r--r--subprojects/gst-plugins-good/ext/pulse/pulsesink.c6
-rw-r--r--subprojects/gst-plugins-good/ext/pulse/pulsesink.h6
-rw-r--r--subprojects/gst-plugins-good/ext/pulse/pulsesrc.h16
3 files changed, 14 insertions, 14 deletions
diff --git a/subprojects/gst-plugins-good/ext/pulse/pulsesink.c b/subprojects/gst-plugins-good/ext/pulse/pulsesink.c
index 33fbfc066f..348150dd87 100644
--- a/subprojects/gst-plugins-good/ext/pulse/pulsesink.c
+++ b/subprojects/gst-plugins-good/ext/pulse/pulsesink.c
@@ -178,9 +178,9 @@ struct _GstPulseRingBuffer
gint64 m_offset;
gint64 m_lastoffset;
- gboolean corked:1;
- gboolean in_commit:1;
- gboolean paused:1;
+ gboolean corked;
+ gboolean in_commit;
+ gboolean paused;
};
struct _GstPulseRingBufferClass
{
diff --git a/subprojects/gst-plugins-good/ext/pulse/pulsesink.h b/subprojects/gst-plugins-good/ext/pulse/pulsesink.h
index 51ec86a25a..7f45cb2505 100644
--- a/subprojects/gst-plugins-good/ext/pulse/pulsesink.h
+++ b/subprojects/gst-plugins-good/ext/pulse/pulsesink.h
@@ -57,9 +57,9 @@ struct _GstPulseSink
GstPulseDeviceInfo device_info;
gdouble volume;
- gboolean volume_set:1;
- gboolean mute:1;
- gboolean mute_set:1;
+ gboolean volume_set;
+ gboolean mute;
+ gboolean mute_set;
guint32 current_sink_idx;
gchar *current_sink_name;
diff --git a/subprojects/gst-plugins-good/ext/pulse/pulsesrc.h b/subprojects/gst-plugins-good/ext/pulse/pulsesrc.h
index c532afb189..a39a043910 100644
--- a/subprojects/gst-plugins-good/ext/pulse/pulsesrc.h
+++ b/subprojects/gst-plugins-good/ext/pulse/pulsesrc.h
@@ -56,19 +56,19 @@ struct _GstPulseSrc
gchar *device_description;
gdouble volume;
- gboolean volume_set:1;
- gboolean mute:1;
- gboolean mute_set:1;
+ gboolean volume_set;
+ gboolean mute;
+ gboolean mute_set;
guint32 current_source_idx;
gchar *current_source_name;
gint notify; /* atomic */
- gboolean corked:1;
- gboolean stream_connected:1;
- gboolean operation_success:1;
- gboolean paused:1;
- gboolean in_read:1;
+ gboolean corked;
+ gboolean stream_connected;
+ gboolean operation_success;
+ gboolean paused;
+ gboolean in_read;
GstStructure *properties;
pa_proplist *proplist;