Fix various bitfield warnings

clang rightly complains about using gboolean
as type for bitfields, since it is signed.
Avoid that.
This commit is contained in:
Matthias Clasen 2023-04-27 06:46:36 +02:00
parent 9ae0a3865c
commit 051b463c9a
6 changed files with 24 additions and 25 deletions

View File

@ -1020,10 +1020,10 @@ gsk_gl_command_queue_execute (GskGLCommandQueue *self,
guint program = 0;
guint width = 0;
guint height = 0;
G_GNUC_UNUSED guint n_binds = 0;
guint n_fbos = 0;
G_GNUC_UNUSED guint n_uniforms = 0;
guint n_programs = 0;
G_GNUC_UNUSED unsigned int n_binds = 0;
G_GNUC_UNUSED unsigned int n_fbos = 0;
G_GNUC_UNUSED unsigned int n_uniforms = 0;
G_GNUC_UNUSED unsigned int n_programs = 0;
guint vao_id;
guint vbo_id;
int textures[4];

View File

@ -18,9 +18,9 @@ struct _GskGLProfiler
GLuint gl_queries[N_QUERIES];
GLuint active_query;
gboolean has_queries : 1;
gboolean has_timer : 1;
gboolean first_frame : 1;
unsigned int has_queries : 1;
unsigned int has_timer : 1;
unsigned int first_frame : 1;
};
enum {

View File

@ -9,7 +9,7 @@ typedef struct {
char *description;
gint64 value;
gint64 n_samples;
gboolean can_reset : 1;
unsigned int can_reset : 1;
} NamedCounter;
typedef struct {
@ -21,9 +21,9 @@ typedef struct {
gint64 max_value;
gint64 avg_value;
gint64 n_samples;
gboolean in_flight : 1;
gboolean can_reset : 1;
gboolean invert : 1;
unsigned int in_flight : 1;
unsigned int can_reset : 1;
unsigned int invert : 1;
} NamedTimer;
typedef struct {

View File

@ -83,7 +83,7 @@ typedef struct
GskDebugFlags debug_flags;
gboolean is_realized : 1;
unsigned int is_realized : 1;
} GskRendererPrivate;
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GskRenderer, gsk_renderer, G_TYPE_OBJECT)

View File

@ -69,9 +69,9 @@ typedef struct {
GParamSpec *pspec;
gpointer value;
GString *text;
gboolean translatable : 1;
gboolean bound : 1;
gboolean applied : 1;
unsigned int translatable : 1;
unsigned int bound : 1;
unsigned int applied : 1;
char *context;
int line;
int col;

View File

@ -66,22 +66,21 @@ struct _GtkFileSystemModel
GArray * files; /* array of FileModelNode containing all our files */
guint n_nodes_valid; /* count of valid nodes (i.e. those whose node->row is accurate) */
GHashTable * file_lookup; /* mapping of GFile => array index in model->files
* This hash table doesn't always have the same number of entries as the files array;
* The hash table gets re-populated in node_get_for_file() if this mismatch is
* detected.
* This hash table doesn't always have the same number of entries
* as the files array; it gets re-populated in node_get_for_file()
* if this mismatch is detected.
*/
GtkFileFilter * filter; /* filter to use for deciding which nodes are visible */
guint frozen; /* number of times we're frozen */
gboolean filter_on_thaw :1;/* set when filtering needs to happen upon thawing */
guint show_hidden :1; /* whether to show hidden files */
guint show_folders :1;/* whether to show folders */
guint show_files :1; /* whether to show files */
guint filter_folders :1;/* whether filter applies to folders */
guint can_select_files : 1;
unsigned int filter_on_thaw : 1; /* set when filtering needs to happen upon thawing */
unsigned int show_hidden : 1; /* whether to show hidden files */
unsigned int show_folders : 1; /* whether to show folders */
unsigned int show_files : 1; /* whether to show files */
unsigned int filter_folders : 1; /* whether filter applies to folders */
unsigned int can_select_files : 1;
};
static void freeze_updates (GtkFileSystemModel *model);