Merge branch 'random-fixes' into 'main'

Reduce the amount of compile-time warnings

See merge request GNOME/glib!2441
This commit is contained in:
Philip Withnall 2022-01-25 19:45:03 +00:00
commit 01628f95b5
3 changed files with 4 additions and 2 deletions

View File

@ -486,7 +486,9 @@ _xdg_mime_magic_parse_magic_line (FILE *magic_file,
/* We clean up the matchlet, byte swapping if needed */ /* We clean up the matchlet, byte swapping if needed */
if (matchlet->word_size > 1) if (matchlet->word_size > 1)
{ {
#if LITTLE_ENDIAN
unsigned int i; unsigned int i;
#endif
if (matchlet->value_length % matchlet->word_size != 0) if (matchlet->value_length % matchlet->word_size != 0)
{ {
_xdg_mime_magic_matchlet_free (matchlet); _xdg_mime_magic_matchlet_free (matchlet);

View File

@ -608,7 +608,7 @@ g_sequence_move_range (GSequenceIter *dest,
GSequenceIter *begin, GSequenceIter *begin,
GSequenceIter *end) GSequenceIter *end)
{ {
GSequence *src_seq, *end_seq, *dest_seq; GSequence *src_seq, *end_seq, *dest_seq = NULL;
GSequenceNode *first; GSequenceNode *first;
g_return_if_fail (begin != NULL); g_return_if_fail (begin != NULL);

View File

@ -76,7 +76,7 @@ test_search (gconstpointer d)
for (i = 0; tests[i].string != NULL; i++) for (i = 0; tests[i].string != NULL; i++)
{ {
gboolean match; gboolean match;
gboolean ok; gboolean ok = FALSE;
gboolean skipped; gboolean skipped;
if (setlocale (LC_ALL, tests[i].locale)) if (setlocale (LC_ALL, tests[i].locale))